Site logo

Archived topic

Latest Update Doesn't Work With WP-Quiz

7 replies · Started by Ryan on October 8, 2020

Viewing posts 1–8 of 8

Hi there,

You have a javascript error on the page from a personality.js file saying jQuery is not defined.

The theme won't load jQuery unless it requires it, so scripts like the above need to do it if they need.

You can force it to load like this:

add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_script( 'jquery' );
} );

Hey Tom, where do I add that code?

I tried to add it using the 'Code Snippets'plugin but it did not work.

Hmm that code should work in Code Snippets.

Did you clear all of your caching plugins or server cache after adding it?

Hey Leo,

Yes, I have purged my caching plugins and have also done so on Cloudflare. Still no luck unfortunately.

Can you temporarily disable your caching? The fact that it's still saying jQuery is not defined means the function isn't working on your site. That means your site is likely cached.

Hey Tom,

It turns out that it was a conflict between GP and Autoptimize.

For anybody else who has the problem in the future, I unchecked the 'Aggregate JS-files?' button on the plugin and it now works perfectly.

Thanks for the help guys.

This likely is a conflict between Autoptimize and the Quiz plugin, as GP doesn't depend on jQuery for anything.

Glad you got it sorted! :)

This archived topic is closed to new replies.