Skip Navigation

[Resolved] The editor has encountered an unexpected error.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 1 voice.

Last updated by Minesh 1 month, 1 week ago.

Assisted by: Minesh.

Author
Posts
#2807770

I've reported this before for other templates. But I want to fix this myself, I can't keep reporting bugs all the time, and wait.

A template errors when trying to open in Block Editor: The editor has encountered an unexpected error.

The error is:
SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
at JSON.parse (<anonymous>)
at save (hidden link)
at Qr (hidden link)
at Zr (hidden link)
at hidden link
at uo (hidden link)
at hidden link
at fo (hidden link)
at hidden link
at Array.reduce (<anonymous>)

I've tried one of the suggested fixes, which is to code out line 62
return apply_filters( 'wpv_process_conditional_shortcodes', $content );

But that didn't work for this error.

#2807790

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I shared before there is no other user reported the issue, its specific to your install.

Where on what page you are facing this issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2807800

Can you just explain how to open the template? I want to fix it myself, as I told you several times before.

#2807802

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - first I will require to know what template is it and need admin access details.

Once I verify all things I will be able to tell you how you can open the template as it may require direct database interaction.

I have set the next reply to private which means only you and I have access to it.

#2808009

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please check now: hidden link

It was the same issue - the page was having Toolset Form block. I've removed the Toolset form block and replaced with shortcode block and added the Toolset form shortcode to shortcode block.

I can see it working.

#2808010

Great, but let me ask again. I would like to resolve this myself in the future. You are again failing to include instructions on how I can solve this. Are you able to explain to me how I can solve this issue in the future when the template/page is inaccessible or not?

#2808013

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - you will have to do database edit for such a case.

You should try to find the post ID: 35864 within the wp_posts table.

Then edit the post and with post_content column there was originally following content was there:

!-- wp:paragraph -->
<p>The IKU™ courses and programs are hosted on the Cavemantraining™ shop. To get the product, please generate a unique coupon code below. Each unique coupon remains valid for 4 weeks and the number of coupons you can generate are limited.</p>
<!-- /wp:paragraph -->

<!-- wp:spacer {"height":"60px"} -->
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:toolset/cred-form {"form":"{u0022IDu0022:u002235882u0022,u0022post_titleu0022:u0022Generate Couponu0022,u0022post_nameu0022:u0022generate-couponu0022,u0022formTypeu0022:u0022postu0022,u0022formActionu0022:u0022newu0022}","formType":"post","formAction":"new"} -->
<div class="wp-block-toolset-cred-form">[cred-form form="generate-coupon" ]</div>
<!-- /wp:toolset/cred-form -->

As you can see there is Toolset form block with above content like this:

<!-- wp:toolset/cred-form {"form":"{u0022IDu0022:u002235882u0022,u0022post_titleu0022:u0022Generate Couponu0022,u0022post_nameu0022:u0022generate-couponu0022,u0022formTypeu0022:u0022postu0022,u0022formActionu0022:u0022newu0022}","formType":"post","formAction":"new"} -->
<div class="wp-block-toolset-cred-form">[cred-form form="generate-coupon" ]</div>
<!-- /wp:toolset/cred-form -->

I've removed the Toolset form block and save the entry then you will be able to load the page in backend and once page is loaded in backend you should add the shortcode block and within shortcode block add the form's shortcode [cred-form form="generate-coupon"] and save the page.

Always take full backup of your database as you are playing with database. If you do not know how to do it, you can always ask for help.