This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 12 replies, has 2 voices.

Last updated by Rajeeb Banstola 1 month, 3 weeks ago.

Assigned support staff: Rajeeb Banstola.

Author Posts
August 14, 2019 at 8:01 pm #4397299

jesperK-9

I am trying to: checkout -> english translation (from Danish to English)

Link to a page where the issue can be seen: hidden link or if you start at hidden link and put some of the products in the cart.
(if asked for code, it's welovefood)

I expected to see: a normal checkout

Instead, I got: the error: SyntaxError: Unexpected token < in JSON at position 0

August 15, 2019 at 4:37 am #4399111

Rajeeb Banstola

Hi,

I do not see the error on your cart page. Were you able to solve it? Check the attached screenshot.

August 15, 2019 at 9:11 am #4399825

jesperK-9

Hi Rajeeb,

it's not the cart that's the issue. It's the checkout 🙂

When proceeding to checkout, "your order" is just constantly loading and when clicking "Gå til betaling" (go to payment), it makes the SyntaxError as earlier described.

/Jesper

August 15, 2019 at 9:26 pm #4403659

Rajeeb Banstola

Hi,

I'm very sorry for the confusion.

Navmenu addon for Elementor is throwing JavaScript erorrs on the browser console. Please disable the plugin and see if the checkout works.

If it does, you would have contact Navmenu addon for Elementor about possible incompatibility with WooCommerce pages.

Let me know if you have any questions!

August 19, 2019 at 8:00 am #4414221

jesperK-9

Hi,

Still the same error after disabling Navmenu addon and clearing cache.

Any suggestions?

August 19, 2019 at 8:27 am #4414561

jesperK-9

Under 'your order' it's in a constant thinking process and when pressing 'gå til betaling', it makes the error: SyntaxError: Unexpected token < in JSON at position 0

But ONLY in the english version. Not the original Danish version.

August 21, 2019 at 7:12 am #4428407

Rajeeb Banstola

Hi,

I would like to request your WordPress login detail in order to debug the issue further. I've marked your next reply as private.

August 22, 2019 at 3:26 am #4436089

Rajeeb Banstola

Hi,

Please follow the workaround on this page and let me know if that works for you:

https://wpml.org/errata/uncaught-in-promise-syntaxerror-unexpected-token-in-json-at-position-0/

August 22, 2019 at 7:37 am #4437145

jesperK-9

Hi Rajeeb,

I'll try that.

I need to know if you've made ANY corrections or any adjustments or such on our site, please.

It's not showing things properly now in the shop and there's a small black line on the left above all headers, sections and such. On our whole site.

Let me know asap

August 22, 2019 at 3:58 pm #4440973

Rajeeb Banstola

Hi,

I haven't changed anything on your dashboard. Please check the link and let me know if you need any help.

August 23, 2019 at 7:03 am #4444613

jesperK-9

Hi.
We’re running PHP 7.3. The article is for version 5.X.
The problem does still occur unfortunately.

August 23, 2019 at 12:16 pm #4446735

jesperK-9

Hi

We have investigated the issue further.

· WP memory limit is now 256 MB
· We've enabled WP debug and checked error log. There are no errors
· WordPress site health shows no issues
· There are no errors in the console
We are running PHP 7.3 and always have been

The problem only occurs when viewing the check out page in English. In danish, it loads just fine. See attached screenshots. The cart content loads forever.

Would you mind investigating further?

August 24, 2019 at 1:05 am #4450185

Rajeeb Banstola

Hi,

Can you please confirm you followed the steps given in the link? The issue seems to be happening in PHP 7 as well.

https://wpml.org/errata/uncaught-in-promise-syntaxerror-unexpected-token-in-json-at-position-0/