Skip Navigation

[Resolved] Layouts Plugin/Elementor (SyntaxError: Unexpected token < in JSON at position 0)

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by Nashaat 5 years, 5 months ago.

Author
Posts
#1148502

Hi,
I have an issue on the WooCommerce Checkout page. everytime i try to checkut it's showing following error "SyntaxError: Unexpected token < in JSON at position 0"

So as usual i deactivated all plugins and started to activate one by one.
I am using Astra + Elementor / Elementor Pro + Toolset plugins.

so i activated most of other plugins than toolset and this Error disappeared. then i started to activate Toolset plugins one by one and works fine. once i activated Layouts Plugin the Error on the checkout paged showed up again.

So in that case i tried to deactivate elementor not (elementor pro) then the issue was resolved no error was showing too.

This means its coming or from Elementor or from Layots.

so i did following: deleted all Layout CSS & JS and activated both plugins Layouts & Elementor. then i started to disable single Layouts of my post Types, one by one. The Error remained until i disabled a single Layout for WooCommerce Orders.

I have a single Layout for orders designed to show the single order on the frontend. this layout is working fine and showing a print button etc... So i was thinking maybe i have a syntax error in my html and CSS code in that Layout. I deleted all the content. but the Error remained. so Deleted the Template completely and created a new single layout for orders and kept that layout without content but the issue remained on the Checkout page. Only if i delete this single layout for orders, the Error disappear with both Elementor and Layouts activated.

I have tried also to delete the single layout for orders and create it with Content Template. but no orders showed up on the frontend anymore even though that the content template is adding for orders and updated to existing Orders

please note if i disable elementor, everything works fine again. as well if i disable Layouts plugin everything works fine(but cat see Orders on frontend anymore)

the thing is.. Layout and Elementor and Layout for Order and Checkout is nothing new on the site. I have made this couple of month ago and everything was working fine. it looks like in one of the latest updates, something has changed causing this Issue.

This is how the Order on the frontend looks like (please ignore the debugging info, its not the reason) : hidden link

You can do following:

1- Login to the site (you can translate the site to english with google chrome)

2- now to see the Error add this product for example to the cart (on the bottom of the pages on the side): hidden link

3- go to checkout page after adding a product: hidden link and try to submit it ( it should show you the syntax Error)

4- if you want to fix this you can choose one of following

a- Disable elementor plugin
b- Disable Layout Plugin
c- Unsign "Template for Orders" Layout ( hidden link )

Please let me know if you need more instructions.

#1148562

The Issue was coming from Elementor version 2.3.1 , i have updated to the latest version 2.3.2 and this has solved the issue. You can see the description of the bug in Elementor change log here: hidden link

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.