3

I have an existing CMS website that seemingly has been working fine for several months. Just recently we have lost the ability to access the admin portion of the site (the rest of the site works well). To our knowledge, nothing has changed to make the site behave differently.

We have since set up our own dev box with identical code and it seems to behave the same way. Works one day, next day we can't log in. No errors in browser or log files. Browser cache and cookies cleared. Different browsers all work the same way. You log in, it blinks a second, then redirects to login. If wrong password entered, we get the wrong password error. Even the database seems to show our login was good.

We have multiple environments on the original site, only the production environment has this issue. Our second environment only has the production environment so i don't think they are conflicting.

Only thing i can think of is nginx cache but we don't cache the admin directories. I don't see anything different in .htaccess that would do this.

Any ideas?

  • Our current theory is that we somehow voided Crafts licensing and they are not letting us use the control panel. We are not sure the best way to contact them on this issue. – rscott6666 Jan 16 '17 at 13:44
  • Pretty strange. Try trashing the entire contents of your /craft/storage folder, see if that helps. – Lindsey D Jan 16 '17 at 22:20
  • Just to firmly debunk your theory for future readers, @rscott6666 – Craft will not lock you out of your control panel if your license is invalid, it'll simply display an annoying alert. – Mats Mikkel Rummelhoff Sep 9 '17 at 12:27
2

Sorry for answering my own question.

Upon a suggestion from P&T, we found that our Nginx configuration was removing the cookies when it cached the page. When we left the cookies in, we were able to log in.

We still don't know what changed to make the site suddenly not work, but at least the control panel is usable.

| improve this answer | |
  • Glad you got it sorted! – Brad Bell Jan 20 '17 at 2:09
  • What was the actual solution to this? I'm running into the same thing. – hisnameisjimmy Aug 28 '17 at 22:29
  • The actual solution was to remove the nginx lines that removed the cookies. – rscott6666 Sep 11 '17 at 11:36
2

Just want to chime in with what fixed this for me.

I had the same issue and it was the Nginx configuration. Specifically, the order that I some of my location and cache settings.

To get it working, I strictly followed the order from this: https://nystudio107.com/blog/static-caching-with-craft-cms

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.