Jump to content

I can't login in prestashop back office


Rodentia

Recommended Posts

I have the same issue and it started yesterday on all my 3 PrestaShop websites. I'v been looking for the reason all day and it seems to me that it is JQuery.ajax related.

It started when we noticed that we did not get orders all day yesterday. The ajax-enabled cart's 'Add to cart' did not work anymore. These shops are running for over 3 years without a problem and suddenly this happend. When we disabled the ajax functionality the 'Add to cart' button started working again. Using this mode, after adding something to the cart, the full cart is shown. So I tried to delete a product from the cart and it failed. Using the Chrome developer tools (also tried it on FireFox) I found out that the ajax calls did not return anything so 'data.hasErrors' crashed because 'data' was 'null'.

What does this have to do with this thread? Well during our search I tried to login into the backend in order to clear the cache and to disable all the CCC stuf and smarty cache. On one website I was able to get in the backend because the browser remembered me. But on the other sites the login failed just as you can see in the image above. I was so stupid to sign out from the shop where I was able to get in the backend because after that I could not login here also. So now I have 3 shops where I cannot make any sale and cannot login in the backend also. I assume the login is also depending on Ajax but I'm not sure. Maybe this rings a bell for someone?

 

Oh, and yes, I have enabled developer mode ('_PS_MODE_DEV_ = true' in defines.inc.php) but it shows nothing.

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

Hi Sool65,

When you have development mode enabled you can very likely see the error code of the faulty ajax call. But to see it you have to use the browser console and go to the files section. 

Did you try emptying the cache? You don;t need to enter the backoffice for that. You just delete the files or use my (free) Prestools.

A third option is that some file has gone wrong. It has been moved or somehow modified. If you have a copy of your shop - or a backup - you might copy the files from the backup over those in the online shop. Sometimes that fixes the problem.

Link to comment
Share on other sites

Hi musicmaster,

I have cleared the cache and disabled all the cache options in the backend of one of the 3 shops.
I happend to have a cookie or something on one particular PC with which I was able to get in.

We allready restored the installation with the version from 3 days back (when verything was still o.k.) but that did not solve it.

About the ajax call: using the Chrome Browser Console I could see that the ajax call did not return a error message. It was the 'on success handler' that went wrong because there was no response data received where it was expected. Jus the value 'null'. So the real issue is that the XMLHttpRequest went well but without any data returned.

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

Well, sometimes when you expect the least you get the most.

Just a minute ago my friend - who happens to own the hosting company where our shops are hosted - called me and told that he was able to solve the issue.
Because of a problem with e-mails sent from our shop earlier this week, they had to change something in DirectAdmin and had to run a kind of configuration repair procedure. This appearently broke the php version binding in some way. On the server php 5.6, 7.0 and 7.2 are installed. Our shops were running php 7.0. Only when ajax calls were served it seemed that php 7.2 was used and this lead to all kind of problems. The strange thing is that it did not report any errors at all.

Because something broke between DirectAdmin and the PS virtual machine config the solution was to add one line in the .htaccess:

  • AddHandler application/x-httpd-php7 .php


Now all calls are working as expected. Also on the installations where we did not restore a backup yet.

 

I hope this solution is of any help for Rodentia but is was for me.

Link to comment
Share on other sites

  • 4 years later...

I had to deal with such a problem today.

I couldn't get to my backoffice no matter what.

I cleaned cache from the file manager at /var/cache/

I went to phpmyadmin and regenerated 15 times the password with MD5 encoding

I cleared cache again. I used different browsers for the same reason.

The solution was here. Credit and much thanks to nemops!

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...