Support Forum

Bootstrap error

1 2 3 4 >
Joan Alamo Vallejo
Member
Gold Members
Apr 2, 2017 - 11:33 am

Hi, I just change my wordpress theme and I'm seeing this error, any idea of what may be wrong? I'll also ask the theme's creator..

https://www.subnoise.es/foro/

Uncaught TypeError: Cannot read property 'documentElement' of null
at c.show (bootstrap.js?ver=1.0:6)
at c.enter (bootstrap.js?ver=1.0:6)
at HTMLDocument.d (jquery.js?ver=1.12.4:2)
at HTMLDocument.handle (jquery.js?ver=1.12.4:3)
at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)

Mr Papa
Simi Valley, CA
Member
Free Members
Apr 2, 2017 - 4:29 pm

the wp theme uses bootstrap.js which conflicts with the wp supplied jquery ui library...  unfortunate that theme authors continue to use stuff that conflict with base wp stuff...  of course, if a wp theme and other plugins dont use the wp jquery ui, you wouldnt notice it...

the key is to get jquery ui to load after bootstrap (which theme authors could easily ensure)...  since you are already loading both in the footer, probably going to have to modify the wp theme to control the loading order...

can you find in the wp theme where its loading bootstrap.js?

also should mention that you appear to be caching forum pages which is likely to cause other issues...  see this on pages:

<!-- Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/

Page Caching using disk: enhanced (SSL caching disabled)

 Served from: www.subnoise.es @ 2017-04-03 00:24:38 by W3 Total Cache -->

the forum page is dynamic so wp plugins that cache it will do it wrong and potentially cause issues...

Joan Alamo Vallejo
Member
Gold Members
Apr 3, 2017 - 12:37 am

That is weird, I have on the cache settings to never cache this:

wp-.*\.php
index\.php
foro
/foro
foro/*
/foro/

About the bootstrap, the theme uses a plugin called "bootstrap shortcodes", could this be it?

Yellow Swordfish
Glinton, England
Member
Apr 3, 2017 - 4:16 am

It is possible. Can it be deactivated so you can find out?

Joan Alamo Vallejo
Member
Gold Members
Apr 3, 2017 - 4:23 am

No, it wasn't. I'm still waiting the answer from the theme autors 🙁

What about the cache? Which is the right way to tell the cache plugin not to cache the forum page?

Yellow Swordfish
Glinton, England
Member
Apr 3, 2017 - 5:03 am

As far as I am aware the /foro entry should do it. @mr-papa will correct me if I am wrong. have you added this exclusion to all cache types? And, if so, perhaps you may need to talk to the cache authors support.

Joan Alamo Vallejo
Member
Gold Members
Apr 3, 2017 - 6:27 am

Turns out the message doesn't mean the page has been cached, only that caching is available

Yellow Swordfish
Glinton, England
Member
Apr 3, 2017 - 9:48 am

For the record - do you have your forum set to load javascript in the footer (Integration - Page and Permalink).

If not - give it a try...

Joan Alamo Vallejo
Member
Gold Members
Apr 3, 2017 - 10:03 am

Yes, I have "Filter WP list pages" and "Load javascript in footer" checked

Joan Alamo Vallejo
Member
Gold Members
Apr 3, 2017 - 1:17 pm

Found this in my functions.php

wp_enqueue_script('bootstap', get_template_directory_uri().'/assets/js/bootstrap.js', 'jquery', '1.0', TRUE);

 

"Bootstrap" is mispelled, could this be the reason of the error?

1 2 3 4 >