Jump to content

[SOLVED] Prestashop redirects to login screen when accessing some BO menu items


Recommended Posts

Hi!

 

Since this morning, when we try to access the orders list or the customers list, Prestashop will direct us to the login screen. It doesn't quite crash out because I can go back to the previous screen in the browser and work away in other areas of the back office, but as soon as I click on "orders" or "Customers", I get thrown out to the login screen again. 

 

Any ideas appreciated.

 

P.S. I did an upgrade to latest version 1.6.1.17 just now but that didn't fix it.

Edited by intandem
issue resolved (see edit history)
Link to comment
Share on other sites

Thanks for that suggestion. I tried it though and no error messages are coming up after clicking on Orders and then being thrown onto the log-in page. Had another problem on the checkout page on the site itself and got that figured out (little side bonus) but unfortunately not the order list / customer list one. 

Link to comment
Share on other sites

Seems you are having a redirection problem.... Did you tried to rename .htaccess on root of your shop on FTP ? Rename it to .htaccess.bak for ex. and try. If not and you made some changes on files you should revert to original. You can detect changes made by the date of the file on FTP. Take into consideration that also override files can produces errors.

If you cannot identify, than a rollback of an back-up of FTP on day on where all was working could help as well. Ask you provider, if you don't have daily back-ups

Link to comment
Share on other sites

Have tried regenerating the .htaccess file but unfortunately that did not help. The only "technical" thing that happened is that we changed nameservers yesterday. The website had been moved to a new server earlier this week under time pressure so we just pointed the A record over to the new hosting. Everything was working fine. Yesterday, we moved the full nameservers across and from what I understand, it was also working fine afterwards but my client cannot confirm this for me 100%. But I can't see how this could be linked. 

Edited by intandem (see edit history)
Link to comment
Share on other sites

Oh yeah. There is a redirect error. DNS not working, some .htaccess on server before Prestashop redirecting somewhere, or new server not well configured.

Check server configuration here: https://www.prestashop.com/forums/topic/633856-server-requirements-tested-in-production-for-ps-16/

You need to read server error logs of new server and old server.

Link to comment
Share on other sites

Ok, I just figured something out but don't know what to do about it - but might point someone with more skills than me in the right direction. I just took a look at the sidebar navigation's code and each menu item has a unique token value as part of it. If I take the link code minus the token element and put that in the browser, I can access the problem pages without difficulty.


For example:
https://www.xyzcompany.com/admin/index.php?controller=AdminOrders works
https://www.xyzcompany.com/admin/index.php?controller=AdminOrders&token=4da9c0652536ec6456c784fa1b04a2bb as per <li> code does not work and adds "redirect=AdminOrders" to the end of the URL once entered.


However, the other menu items that don't have an issue have the token as part of their URL without a problem. So this is where my knowledge ends as I don't really know anything about tokens etc. Is any of this enlightening to you guys?

Link to comment
Share on other sites

So for anybody with the same problem who might come across this post, our issue got resolved once I accessed the problem pages with their URL minus token manually and moved around the sub-navigation pages a little. Not being very familiar with how the tokens work I can only assume that something was locked and got regenerated this way. The URLs in the navigation now have new tokens in them that are working fine. 

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Thanks for posting this solution! I encountered the same problem, so I removed the token from the url and I could access the orders page. However, for the fix to be permanent I had to browse through the order pages (using the arrow navigation at the bottom of the page). Then it stayed fixed.

I was so glad to find this solution! thanks again

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
×
×
  • Create New...