Skip Navigation

[Resolved] jQuery error on index page for the #views-extra-css script

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#1242406

I am trying to:
Nothing.
I get this error in the console:
(index):279 Uncaught ReferenceError: jQuery is not defined
at (index):279
And in the index:279 the code is:
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
var extra_css = $( "#views-extra-css" ) ? $( "#views-extra-css" ).text() : null; if( extra_css ) { $( 'head' ).append( '<style>' + extra_css + '</style>' );
$( "#views-extra-css" ).remove(); }
$( 'head' ).append( $( "#views-extra-css-ie7" ).html() );
$( "#views-extra-css-ie7" ).remove();});
</script>

Link to a page where the issue can be seen:
hidden link
But the site is in maintenance mode, can't go public yet

I expected to see:
No error

Instead, I got:

#1242526

jQuery needs to be imported and loaded at the begin of the page.
If that is not the case it will fail also with other Plugins using jQuery.

Could it be that some other software is disabling jQuery somehow or enqueues it too late?
That could be verified by using only Toolset and no other plugin, + activating another Theme, to test if the issue is solved.

If so, then activating each software one by one will show when the issue comes back, indicating the culprit plugin (or theme).