NO BUG: No JQuery executed when logged out

Bricks Version: 1.6.1
Browser: Latest Chrome, Firefox, Edge
OS: Linux Mint 21.1
URL: Klein aber Mein - Gepflegtes Einfamilienhaus in Saarbrücken mit Garten ⟰ Immobilienmakler Sven Conrad

While I’m logged into the website, the gallery on the above mentioned page (and all other real estate properties in the portfolio) works. As soon as I log out, nothing happens when I click on the images.

According to the support team of WP-ImmoMakler, the plugin I use for this portfolio, no jQuery is executed when logged out. They provided the following screenshots from the code:

I disabled the caching plugin WP-Optimize on this site, in fact, I also disabled all other plugins except WP-ImmoMakler and the issue still persists.

What am I missing?

Quick follow-up: Problem persists even when un-checking “Disable jQuery Migrate” in the Performance options.

Hi Matt

Jquery migrate would not have an impact and is only used for older jquery code (unless it is old code obviously).

Because It is loading on when logged in then you know it is being enqueued, When something when logged in (as admin) but not when logged out, this is usually cache settings.

Some cache providers allow you to disable cache for admin and or logged-in users

I would check your caching plugin and if you are excluding JS, make sure to set an exception to not include JQuery.

Hey @Michael thanks for your detailed response. I haven’t had the caching plugin active in several weeks now. Today, I activated it only once to make sure that even though it wasn’t even active at all, caching and minify were disabled in its settings. I then deactivated it again.

Unfortunately, none of this made any difference, so I think we can rule out caching as the culprit :-/

Bricks doesn’t enqueue jQuery, you could add it manually with the following code snippet…

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

Bingo! That did it. Thanks so much!

1 Like

Hi @wplit

Just out of interest, why would it show in the builder if JQuery is not present?

Thanks

Mick

jQuery is always there when logged in.

1 Like