Jump to content

Odd admin activity when moving from local to live


a-ok
 Share

Recommended Posts

Hi folks,

I have a bit of an odd question, but I'm assuming it's related to something I have/haven't changed upon moving my local build to a live server. Everything, locally, works 100% and I have encountered no problems at all, but sometimes, when logging into the admin, the stylesheets/js will break and I'll get a broken page (see image below) – sometimes it happens, sometimes not and the page it happens on varies as well. The thing is, once it's happened, I can't return to the unbroken site until I save over the config.php file. Or, after a few refreshes it returns back. Odd, right?

Looking in the error console on devtools, it states:

Uncaught ReferenceError: $ is not defined sheffieldculture.co.uk.s141188.gridserver.com/:205
Uncaught ReferenceError: initPageEditForm is not defined 

This makes me think that the jQuery is failing to load...

Any thoughts/similar issues?

post-2553-0-20939100-1414594279_thumb.pn

Link to comment
Share on other sites

So, I just tried it and it worked fine and loaded everything. Then navigated to a few other pages in the admin and BOOM nothing... here's what the Network panel said

Screen%20Shot%202014-10-29%20at%2017.27.

I'm wondering if it's something to do with my .htaccess or config? Would this affect the admin area randomly?

Link to comment
Share on other sites

Changed it for this domain, to normal CGI, not FastCGI and haven't had it happen yet. Gone through most of the site. This might've solved it. I will read up on those forum posts, thanks for sharing. Appreciated!

Link to comment
Share on other sites

Yeah, the random nature of it can make troubleshooting difficult. It sounds like a configuration issue. Kongondo has the right idea, but if it doesn't pan out you'll need to trap the error status in the network panel. You can do this by leaving the network on and mashing refresh until failure, then clicking that filter icon and filtering to "css".

Basic gist..

500 means webserver isn't configured correctly.

404 missing or misconfigured

403 permissions error

Link to comment
Share on other sites

  • 5 years later...
On 10/29/2014 at 8:21 PM, a-ok said:

Uncaught ReferenceError: $ is not defined

 Basically $ is an alias of jQuery() so when you try to call/access it before declaring the function, it will endup throwing this $ is not defined error . This usually indicates that jQuery is not loaded and JavaScript does not recognize the $. Even with $(document).ready , $ is still going to be undefined because jquery hasn't loaded yet.

To solve this error:

Load the jQuery library at the beginning of all your javascript files/scripts which uses $ or jQuery, so that $ can be identified in scripts .

There can be multiple other reasons for this issue:

  • Path to jQuery library you included is not correct
  • The jQuery library file is corrupted
  • Working offline
  • Conflict with Other Libraries

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...