Skip Navigation

[Closed] Javascript error when going to post or page

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Tagged: 

This topic contains 17 replies, has 4 voices.

Last updated by yuri.s 8 years, 4 months ago.

Assisted by: yuri.s.

Author
Posts
#353001

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi NAthan

After some hours of debug, and using your initial Duplicator package, I was able to see and check the issue.

In the end, the problem is on the modernizr script, as Yuri pointd out. As he said, it is not well defined, but solving how you register it does not solve the issue.

As a result, one Views script is not enqueued, so the dependencies chain is broken and you get a broken edit page.

I checked the modernizr script that your theme loads, and it is version 2.5.3. I see in the Modernizr page that the current released version is 3.2.0:
hidden link
Maybe thet shipped version of Modernizr is not compatible with one of the native WordPress scripts, the fact is that it is this modernizr.custom.js script the one causing the problem.

So, unfortunately, this is beyond what we can do to help you. The fact is that Views is broken because of the theme. If I deactivate Views, I still get console errors and the edit page is still not usable.

I suggest you to contact the theme author and explain the issue.

Let me know if I can help you with anything else.

Regards.

#353119

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

vanilla.png

Hi Nathan

Sorry for so many answers in a row, but I did some more debugging here and here are my findings. It might help you when contacting your theme author. I used your first Diplicator package as a basis, after fixing the evient error when registering the modernizr script.

- The Duplicator package you first provided, as is, and without TYpes and Views, I have console errors on native WordPress scripts. Something is broken without us, see screenshot vanilla.png
- With Types only, I get the sme console error.
- With Views only, I get the same console error.
- With both Types and Views, I get the same console error.

Strangely, yesterday I had the console error that you mentioned, but it is entirely related to the evident bug when registering the modernizr script. I mean: if I leave the script registering as it is, without fixing, the console error you mentioned appear as you described. Once that is solved, the underlying issue appears.

To confirm this is entirely related to the modernizr script, if I enable Types and Views, and comment out the modernizr registering, it all works fine.

Hope it helps 🙂

Regards.

#355494

Hi Nathan, were you able to resolve this issue with Juan's help?

Let me know if you need any further assistance.

Regards,
Yuri.

The topic ‘[Closed] Javascript error when going to post or page’ is closed to new replies.