URGENT HELP NEEDED! ReferenceError: Can't find variable: jQuery

Permalink
Please help? Can anyone explain why my site works fine in edit mode but the java all breaks when I make it live (see attached)? I need to send this site live tonight, the client is going to be very upset with me and I don't know how to fix it!

Steve.

1 Attachment

 
hutman replied on at Permalink Reply
hutman
This is because jquery isn't loaded when you aren't logged in. You need to require the asset by putting this in your theme's page_theme.php:

public function registerAssets()
{
    $this->requireAsset('javascript', 'jquery');
}
StevieB replied on at Permalink Reply
Hi Hutman, yes, I already have this in my page_theme:

public function registerAssets()
{
$this->requireAsset('javascript', 'jquery');
$this->requireAsset('javascript', 'jquery.ui');
}
hutman replied on at Permalink Reply
hutman
Have you cleared your cache through the Dashboard as well as manually? Can you provide a link to your site?
StevieB replied on at Permalink Reply
HI,

I think MrKDilkington is taking a look at it for me at the minute. If I don't hear back from him in an hour or so I will PM you a log in. The site is currently hidden behind an under construction page.
The cache is all turned off for development but I do also clear it periodically.
StevieB replied on at Permalink Reply
Hutman, thank you for your offer of help, however, disaster averted, it is fixed and purring like a kitten!

I would just like to add my deepest thanks to MrKDilkington, a bona fide genius who went above and beyond the call of duty for me tonight, and then some! Sir, I am forever in your debt.
okapi replied on at Permalink Reply
okapi
I think it would be helpful for anyone experiencing the same problem, to know what caused the issue, resp. how it got fixed...?
StevieB replied on at Permalink Reply
Hi Okapi,

I am not sure I can tell you exactly what the problem was as 'MrKDilkington' came to my rescue and logged into the site remotely to fix my issues. I can tell you there was a lot of issues with my syntax, especially in the header, just because of the way I had pieced pages together following various tutorials as I went along seems to have been a good part of the problem.

There are some great tutorials for Concrete for designers like me who are still learning to develop (although it will never be my first calling), but they can conflict with each other a lot of the time as there is no consistency with them.

I was short on time to get this working yesterday, but when I get a moment I am going to sit down and carefully go through the code and compare to the original files to see what and where the changes were made. If I learn anything from it I will post here!

Steve.
okapi replied on at Permalink Reply
okapi
Hi Steve,

thanks for your speedy reply! I'm just interested in issues rerlated to JS files that do not load because of a similar experience in the past, when it turned out that the default firefox confiuration settings were blocking these files due to some new security policies.
StevieB replied on at Permalink Reply
I see. Wish I could be more helpful, but as a graphic designer, my experience in development can still be described as, well, bumbling beginner! I design then learn what I need as I do the build. Unfortunately that can sometimes lead to the finished job only being three quarters there, whilst the rest needs rescuing by more competent devs, lol! I seriously am learning from all this experience though, and I will ask him at some point to talk me through it properly so I can relay it here.