Frontend.js in console since 9.0.2

I get two errors in the console… any help would be appreciated

Uncaught ReferenceError: $ is not defined
103 frontend.js:66
n frontend.js:12
102 frontend.js:63
n frontend.js:12
388 frontend.js:115
n frontend.js:12
frontend.js:58
frontend.js:59

Uncaught ReferenceError: jQuery is not defined
3 https://www.dynamitedigital.co.uk/concrete/js/features/imagery/frontend.js?ccm_nocache=34de1dec9142b49ac43c293c3245415a46e98bc7:1
n https://www.dynamitedigital.co.uk/concrete/js/features/imagery/frontend.js?ccm_nocache=34de1dec9142b49ac43c293c3245415a46e98bc7:1

Whever I see this type of error message it usually means that jquery has not been loaded.
Check your source code for jquery inclusion.
Most jquery plugins will throw this error if jquery has not been loaded before the plugin is called.

Check this file to see how jquery is loaded in Elemental theme

concrete/themes/elemental/page_theme.php

You should have this file and include jquery in registerAssets() function.

I have realised it’s coming from the

<?php View::element(‘footer_required’); ?>

Once this is removed it’s clears the error so must be coming from concrete CMS itself

Concrete relies on jquery, so it has to be loaded somewhere. I suppose this is your custom theme on concrete version 9?

yeah that correct, I built my theme a few years ago and updated the cms to 9.0.2

feel free to have a look dynamitedigital.co.uk and check the console to see if that help any?

Do you have code like that in application/themes/your_theme_handle/page_theme.php ?

public function registerAssets()
{
    $this->requireAsset('jquery');
}

I don’t have a page_theme.php file, I didn’t know I needed one? always worked fine?

If you want, you can always load jquery manually using cdn and html script tag.

In previous versions you could probably get away without loading jquery when not-logged in. Though don’t remember exactly. It was always set and forget.

Now, for example, Content block loads imagery/frontend.js (for lightbox) where jquery is used.

I have checked the stock elemental theme and I don’t think its even using the frontend.js files?

It’s loaded by block (when it is used on site) in
concrete/blocks/content/controller.php

    public function getRequiredFeatures(): array
    {
        return [
            Features::IMAGERY
        ];
    }

getRequiredFeatures() is new method from version 9.