Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Admin panel isn't rendering correctly after changing to live domain.


Go to End


11 Posts   2252 Views

Avatar
Blackthorn87

Community Member, 34 Posts

12 February 2015 at 12:54am

Hi Everyone,

I've been trawling the web trying to find a solution to my problem for the past few hours and can't find anything that'll help, so I'm going to ask the pros.

We've built a SilverStripe website on a Linux server for a client. The build has gone excellently and the front-end and back-end both worked fine whilst it was on our staging domain (client.domain.co). Now the site has gone live on client.co.uk the admin panel has stopped working. In order to get the site live, we had to change the website account's primary domain to their actual one (client.co.uk) and park the staging domain on the account. Hopefully that made sense.

When I now go to client.co.uk/admin the administration panel is squashed up in the corner, as you can see from the attached image.

I've tried flushing the admin panel (/admin?flush=1 & /admin?flush=all & /admin/pages?flush=1 & /admin/pages?flush=all) with not luck.

I've clean out the 'silverstripe-cache' directory.

I've set the combined files to false in mysite/_config.php like it says here:
http://stackoverflow.com/questions/8133880/i-cant-access-the-admin-panel-in-silverstripe-after-the-browser-is-reopened

I've removed the assets/_combinedfiles and flushed the admin again like it says here:
http://stackoverflow.com/questions/24347101/silverstripe-install-admin-js-errors

But none of the above have sorted my problem, either on their own or in combination with each other.

I'm hoping this isn't a stand alone problem for me and someone else can help.

Thanks,

Arun.

Attached Files
Avatar
Blackthorn87

Community Member, 34 Posts

12 February 2015 at 11:51pm

UPDATE: Does anyone have ideas about this? I have asked our hosting company and they have said it's most probably to do with the files. Just to note, we are having this same problem with 2 websites we have built this one and another. Thanks.

Avatar
martimiz

Forum Moderator, 1391 Posts

13 February 2015 at 12:57am

I haven't encountered this special problem, so I have no solution for you just now, but just to make sure: I suspect you already put your site in dev mode, and saw no obvious error - not even on reloading the cms after loging in?

- Are the staging site (that is working) and the live site (that isn't) on the same platform?
- Have you tried a developer plugin like firebird on firefox, to look for missing files or errors?
- The problem is the same in different browsers?
- All existing files in the assets directory have sufficient read/write rights?

If all else fails you could try to temporarily install a default SilverStripe site on your live account, to see if the problem persists or if it originates somewhere in some module your own code...

Avatar
Blackthorn87

Community Member, 34 Posts

13 February 2015 at 1:48am

Edited: 13/02/2015 1:49am

Hi martimiz.

You're right, I have put the website in dev mode and there aren't any errors.

The staging site and live site are now one and the same. We use a staging domain on the site until it is complete and signed off by the client, at which point we redirect the live url to the site. When we log in using the staging domain the admin panel is perfectly fine, but when we use the live domain, it breaks.

In regards to the developer plugins, I've tried using the built in inspector in Chrome and Firebug in Firefox, but nothing comes up with an error.

Again, tried looking in Chrome, Firefox & Internet Explorer 11, but it all looks the same.

The assets directory has full write permission, 777 even.

I even emptied the silverstripe-cache directory, the bits that didn't clear over ftp I clear manually using ssh/putty with root access.

I think there has to be a cache somewhere that isn't refreshing, or loading the js properly depending on the domain. It seems to be the js that is causing the problem.

The next thing I'm going to try doing is upload a fresh set of silverstripe files along with our modules and theme files to another server, upload the existing database and do a dev build. This should hopefully rebuild any caches from a clean slate with proper permissions.

I'll update here if that resolves the issue or not.

NOTE: If anyone else has any ideas, please reply on here. I really need to get this issue fixed asap.

Avatar
martimiz

Forum Moderator, 1391 Posts

13 February 2015 at 3:38am

OK - so if I understand it correctly, it is actually one and the same fysical site, but depending on the url (domain) you use to access it, it either breaks or doesn't break?

If so, I didn't quite get that the first time, sorry

Could there be anything in your .htaccess, templates or configuration files still hard pointing to the staging domain?

Avatar
Blackthorn87

Community Member, 34 Posts

13 February 2015 at 4:44am

Yes you are correct, they are the same site, but depending on the domain, the admin panel works or doesn't work.

Here are the config files I've checked:
1. the root .htaccess file
2. the assets .htaccess
3. the root web.config file (just incase)
4. the mysite/_config.php

None of them contain any hard coded links.

I've searched through all the code we've written for admin panel and there aren't any hard coded links that I can see.

Also, thanks for the help martimiz, really appreciate it.

Avatar
martimiz

Forum Moderator, 1391 Posts

13 February 2015 at 5:26am

Strange... I've done this over and over without any problems :( Could it be an opcode caching issue?

Avatar
Blackthorn87

Community Member, 34 Posts

14 February 2015 at 1:01am

What do you mean by an opcode cache issue?

Go to Top