Skip Navigation

[Resolved] Custom Code broken due to Javascript Error

This thread is resolved. Here is a description of the problem and solution.

Problem:

When I try to access the new "Custom Code" tab in settings, I'm met with a never-ending progress bar. (see image one)
Clicking on "Add New" does nothing.

Looking at the console, I see knocked-related javascript errors.

Solution:

This website was setup with old version of Types plugin, and is still using legacy parent/child post type relationships, I suggest you try these:

1) Backup your website database

2) Dashboard-> Toolset-> Relationship

click button "Running the migration", and test again.

Relevant Documentation:

https://toolset.com/2018/05/when-if-to-migrate-relationships-in-old-toolset-sites/

This support ticket is created 6 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Luo Yang 6 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1143268
Screen Shot 2018-11-08 at 1.02.27 PM.png
Screen Shot 2018-11-08 at 1.02.47 PM.png

When I try to access the new "Custom Code" tab in settings, I'm met with a never-ending progress bar. (see image one)
Clicking on "Add New" does nothing.

Looking at the console, I see knocked-related javascript errors. (see image two)

I have many sites with toolset installed. This error is present on some but not others. It's even present on a few multisite sites while it works perfectly fine on others. I have already disabled all plugins except for Toolset. Same result.

Ideas?

#1143640

Hello,

This is abnormal, please try these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017

2) Enable PHP debug mode, get your website PHP debug logs, copy/paste the PHP debug logs/JS errors here:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1147369

#1 and 2 yielded nothing new.
I was able to create a brand new site and not see the error, but that's not an option.
I have some sites with the error that are on a multisite install, but exporting that property requires the paid version of the duplicator plugin.
I am unable to provide an export of our website, as it contains personal data. I could try to clear it of any sensitive information, but it would take a little bit of time.

#1147685

Did you get the PHP debug logs?
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging

I have enabled the private message box, lease update here when your duplicator package is ready to download

#1148961

Thanks for the details, I am downloading the files, will update here if there is anything found

#1149114
code-snippets.JPG

Thanks for the details, I can see the problem with your database dump file, it seems that your website was setup with old version of Types plugin, and is still using legacy parent/child post type relationships, I suggest you try these:
1) Backup your website database
2) Dashboard-> Toolset-> Relationship
click button "Running the migration", and test again.

It works fine in my localhost, see screenshot code-snippets.JPG

More help:
https://toolset.com/2018/05/when-if-to-migrate-relationships-in-old-toolset-sites/

#1149384

Awesome. That did the trick. Now I'll know how to fix all the other ones where the javascript wasn't loading. Thanks.

#1149458

You are welcome