-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.14
-- PHP version -- : 7.3.12
-- Browser(s) name and version -- : Firefox (latest at this time)
-- Error-message(debug-mod must be tuned on) -- : SyntaxError: unexpected token: ':'
Hi,
While implementing our own CAPTCHA found a javascript problem.
Try this:
- make sure you are not legged in
- add a product to the cart
- beginning the checkout
- on the page for the customer try registering without validating the CAPTCHA code
- the form is submitted to the server and an error is returned
- on return all the script codes on the page are executed again, which is great, but joomla has some json object used just as a datablock which generate errors when you try to assign it "text/javascript" type and the rest of the javascript code is stopped.
This are defined with the tag:
<script type="application/json ...>...</script>
You can find an example of this loaded by:
{joomlaroot}\libraries\src\Document\Renderer\Html\HeadRenderer.php on the line 250.
Found the code generating this problem here:
{joomlaroot}\media\com_hikashop\js\hikashop.js on the line 305.
I suggest removing those scripts from the list of scripts to be reloaded on AJAX since they are defined already on the header of the page.