0 - syntax error, unexpected '}'

  • Posts: 59
  • Thank you received: 2
7 years 6 months ago #270065

-- url of the page with the problem -- : balancedequine.com.au/theshop/checkout.html
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.0
-- PHP version -- : 7.0.19
-- Browser(s) name and version -- : Firefox 53.03 and Chrome 58.0.3029.110
-- Error-message(debug-mod must be tuned on) -- : 0 - syntax error, unexpected '}'

I am getting this message 0 - syntax error, unexpected '}' when going to the checkout. This began about 11:00 this morning and I can't understand how it happened. Checking the sources in Chrome, shows that there are 3 errors:
checkout.html:82 Uncaught TypeError: Cannot read property 'registerAjax' of undefined
at checkout.html:82
checkout.html:115 Uncaught TypeError: Cannot read property 'registerAjax' of undefined
at checkout.html:115
checkout.html Failed to load resource: the server responded with a status of 500 ()
Looking at the line numbers, line 82 shows window.Oby.registerAjax(, function(params){
Line 115 shows window.Oby.registerAjax(, function(params){
Both of these lines finish with a { but this is opposite to the error message which shows that the error is }
If the curly bracket on the ends of the respective lines is the problem, where do I find the file to edit and remove these brackets? It tells me that the file is in theshop/checkout.html, but for the life of me I can't find this, or am I going about this all wrong? Thanks in advance for any help with this, Steve

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 6 months ago #270067

Hi,

Unfortunately, we can't help with the information you provided:
- Your website is in maintenance and thus we can't reproduce the problem and analyze the situation.
- The javascript error indicates a problem with the return of an AJAX call being erroneous. The javascript error itself is just happening because the return of the AJAX call is erroneous. So I don't think that the problem comes from the javascript code but something else and trying to fix the javascript won't help you.
- The function registerAjax is a standard function of HikaShop's main javascript file in media/com_hikashop/js/hikashop.js
"Cannot read property 'registerAjax' of undefined" indicates that the hikashop.js was not loaded. Either because the file has been removed or its attributes or the way you configured the server doesn't allow the browser to retrieve it.

That's all we can say without being able to see the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 2
7 years 6 months ago #270128

Hi Nicolas,
Have sent you a private message with details of log in so that you can access the site. I have tried restoring the site back to 11th of May, last backup and tried to restore the database tables from phpmyadmin backup yesterday but this resulted in a fatal 0 - Call to undefined method JApplicationSite::isClient() error and would not display Joomla front or backend. Since then, I have restored the backup I took after putting the site down for maintenance. This has returned the original problem so I'm hoping that you can give me some direction as to what has gone wrong or what we can do to fix the problem. I have purchased the latest version of Hikashop yesterday and installing it resulted in the same issue so if the site is using the earlier version, it makes no difference to upgrade it and I will upgrade as soon as things are running again. Hoping you can make something out of this, Steve

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 6 months ago #270141

Hi,

Unfortunately, I was not able to login with the access you provided:
monosnap.com/file/PQBkQcgNCHtqAdAHaGfqfkitcRuvvc
Please double check the access.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 6 months ago #270175

Hi

I was now able to login and could see the error.
I was even able to get the callstack: monosnap.com/file/BZbVTBGD4Ryz7yx5zQIuTR6w52oyCE
You said that you had HikaShop 3.0.1 but you actually have the 2.6.2. Please provide accurate information.

Also, I found the issue. It comes from a customization you did. You've moved the line:
{address_title} {address_firstname} {address_lastname}
before the :
?>
in the "address_template" view file:
monosnap.com/file/OVRwrJdlAQWbez4mH6VkHYahkuhCKT
This creates an invalid PHP file and thus breaks the display of the page.
Remove the customization on that view file via the menu Display>Views and that will fix the problem.

The following user(s) said Thank You: avonrivercs

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 2
7 years 6 months ago #270220

Hi Nicolas,
Thank you for that, not sure how that happened but all good now. I did purchase the latest version of Hikashop and I did install it like I said in the PM but it didn't fix the issue so I did a restore back to the original version where the issue showed. I will re-install version 3.0.1 as soon as I get a chance, from what I saw before, it looks like it changes the CSS of Hikashop so will need to address that when I upgrade. Again, a big thank you to the team at Hikashop for their work in this issue. All the best,
Steve

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum