Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverstripe admin page not coming

I'm kinda new to silverstripe, had everything working perfect on my localserver, migrated a remote server, things worked fine at the first glance. The next day, I found can't access the admin page though I have been accessing it just the day before. When I type http://www.mydomain.com/admin i get to the homepage of my site with the following url

http://www.mydomain.com/Security/login?BackURL=%2Fadmin%2Fpages

I have looked into all posts online and kinda got lost since there is no error in the page or any indication what could have possible went wrong overnight.

Please advise!

Thanks,

like image 824
Joe Saad Avatar asked Feb 13 '23 06:02

Joe Saad


1 Answers

The page redirects to http://www.mydomain.com/Security/login?BackURL=%2Fadmin%2Fpages because you have been logged out and need to log in again.

If you do not see the log in form on this page it may be because you have removed $Form from your page template.

Find your Layout/Page.ss template. It may be located in themes/[your-theme]/templates/Layout/Page.ss.

Check if you have $Form in your template. If not, add it after $Content.

Edit

The jquery.mobile-1.2.0.min.js you are loading is blocking your log in form. What you can do is not load jquery mobile for the security pages. Here is a simple if statement you can wrap around your script include that will load it for every page except the Security pages:

<% if $ID > 0 %>
    <script src="https://s3.amazonaws.com/codiqa-cdn/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<% end_if %>

Otherwise what you could do is only load jquery mobile for mobile devices and not for desktop devices. This should do the same thing.

like image 161
3dgoo Avatar answered Feb 15 '23 21:02

3dgoo