Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Bootstrap error
Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
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)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
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...

Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 3, 2017 - 4:16 am

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

andy-signature.png
YELLOW
SWORDFISH
Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
Apr 3, 2017 - 6:27 am

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
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...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
Apr 3, 2017 - 10:03 am

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

Avatar
Joan Alamo Vallejo
Member
Free Members
sp_UserOfflineSmall Offline
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?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17357
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10123
Posts: 79616