0

I had a crash of my previous server and I tried to rise my website from the dead. I had backups of all the files & of the database (PostgreSQL). I was not the one who set up the website and my knowledge of Drupal is pretty low. From what I understood/gathered, it is a 7.54 version and it runs with multisite.

What I did so far:

  • Import my database backup in PostgreSQL (in the dumbest way possible: recreate the right database & user, import everything back in place);
  • Upload all the files to my new server (running Debian Jessie);
  • Give access to the sites/ directories to www-data user;
  • Clear the sites/mysite/css/ and sites/mysite/js/ directories;
  • Disable CSS & JS aggregation (using drush).

I did the latest because the style of the website was broken; that was enough to revive it.

I still have on major issue: when I log in, I get the maintenance message. I therefore tried to disable maintenance_mode with drush; it didn't work.

I saw it could be related to cache issues; I therefore tried to clear the cache (once again with drush with drush cc all). It put the whole site in maintenance, and not only when I'm logged in.

I am not sure where the problem comes from. Any hint or suggestion would be greatly appreciated!

  • If you're logged in with admin (using default login form "sitename.com/user/login"), you can try switching the maintenance setting, and clear site cache by navigating to "admin => configure => development => performance" – Yogesh Sep 5 '17 at 9:16
  • @Yogesh I can't access the administration pages; when I log with a user with administrator rights, I still get stuck with the maintenance message. – MBR Sep 5 '17 at 9:48
  • Try logging in with user 1, if you don't have password for this user you can reset it using this doc. You should be able to do anything after logging in with user 1. – Yogesh Sep 5 '17 at 10:05
  • @Yogesh I changed user 1 password and logged in, but I still get the same issue. I check roles with drush user-information {user1} and it only has authenticated user ; it seems to me that could be a problem. – MBR Sep 5 '17 at 10:17
  • you can try setting administrator role to user 1 using steps provided in this ans. – Yogesh Sep 5 '17 at 10:51
1

Here is finally how I solved the problem with Yogesh help: when I tried to access the admin section while logged in as an administrator, I got an error. I therefore checked the watchdog table. The image_dimensions table was somehow missing:

[...] Undefined table: 7 ERROR: relation "image_dimensions" does not exist [...]

I created the missing table, and everyhting was then working (access to the admin section, access to the user section and so on).

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.