jQuery is not defined


I have been using Concrete 5.6 for a while now and have really enjoyed it but I don't feel I can keep on building clients websites on an old CMS that will not be updated, I have tried using 5.7 a couple of times since its release but every time i have frustratingly given up as the platform still feels far from ready.

I am really trying this time though to stick with it but whenever I am logged out of the CMS I get a huge list of 'jQuery is not defined' errors from the following scripts:


I have checked and indeed jQuery is not loading but I cannot seem to find why, I find it very hard to believe this is intended functionality if they are loading all of these extra scripts but I am not sure where to start looking. I do have the standard header_required and footer_required being loaded. Also there is no jQuery loading, this isn't the classic duplicate versions issue.

On a side note, I really don't want my website to be loading an extra 7 JS files that I am not even using, can I stop this from loading when not logged in?

Any advice would be greatly appreciated


View Replies:
Steevb replied on at Permalink Reply
You have issues somewhere.
None of those files should load when logged out.

What theme are you using and which add-ons.
bvcreative replied on at Permalink Reply
Hi Steeveb

Thanks for your response. It is a custom theme that I am building. The only packages I have installed are Block Designer, Block Designer Pro and the Dev Tools.

Many thanks
Steevb replied on at Permalink Reply
Sounds like it could be the theme then.

With Firefox in top bar click 'Tools' then 'Web Developer' then 'Web Console' and with the 'js' tab checked refresh page and see what info you get.
MrKDilkington replied on at Permalink Reply

If you zip your theme and attach it as a reply, I can take a look at it.
bvcreative replied on at Permalink Reply
Hi All

Thank you all for your help, I have resolved the issue now!!

For anyone else that comes across this issue, what I was missing was a page_theme.php file within my theme. I took the one from concrete/themes/elemental/ and copied it into my theme. Then modify the namespace to be:

namespace Application\Theme\[TemplateFolderName];

Please note that Concrete has changed to Application to and the folder name you need to replace with the name of your templates folder but CamelCased if you have spaces.

I then stripped it back so that all of the methods returned empty arrays apart from getThemeName, getThemeDescription and registerAssets. registerAssets being the important one which I have left as below:

public function registerAssets()
        $this->requireAsset('javascript', 'jquery');

Then finally, if the your theme is already installed, you need to uninstall it and re-install it in order for Concrete to detect the new class!!

After that is all started working!!

Thanks to everyone that responded.

All the best