0

I am starting to use CiviCRM under Drupal 7 and feel myself still as a newbie.

I made a backup with the Backup and Migrate module of Drupal (site + DB). As a good practice, I tried immediately after the backup to restore the backup, just to learn how to do in case of trouble.

I better did not because I got the error message:

Your database is marked with an unexpected version number: 5.22.0. 
The v5.20.2 codebase may not be compatible with your database state.
You will need to determine the correct version corresponding to your current database state. 
You may want to revert to the codebase you were using until you resolve this problem.

The menus of CiviCRM are now at the bottom of the screen with an ugly layout.

So backing up and restoring with the module Backup and Migrate seems to be a perfect instrument of (hopefully partial) self-destruction of Drupal or CiviCRM.

I have no idea on how to "revert to the codebase you were using until you resolve this problem". Any help will be appreciated.

  • 1
    your database version is higher than code base, you need to update your code base version to 5.22.0 – Sunil Pawar Jun 8 at 11:59
  • I fixed this issue by upgrading CiviCRM to 5.26.0. – Pierre François Jun 8 at 14:38
1

Your database is running on CiviCRM 5.22.0. scheme Your plugin in /sites/all/modules/civicrm is CiviCRM v5.20.2 You need to download and follow upgrading docs from Civicrm to upgrade your plugin folder to CiviCRM 5.22.0 or above, then do the database upgrade to make Civicrm plugin and the running database scheme run on the same version.

| improve this answer | |
  • This is crazy: I didn't upgrade anything between the backup and the restore operation. Is it possible that the error was already present before the backup/restore operation without showing up, due to a failed attempt to upgrade a week ago? – Pierre François Jun 8 at 13:29
0

It means the CiviCRM database and code are at different versions - but you say that you copied both site & DB, so unless the process failed somewhere you should have the same code and DB as your original site.

Was your backup site empty or did have a previous install of CiviCRM?

Your comment above "Is it possible that the error was already present before the backup/restore operation without showing up, due to a failed attempt to upgrade a week ago?". That doesn't fully explain it since you would upgrade the files first and then run the db updates, so when it fails the files version is newer than the db version and you are reporting the other way round. But if you upgraded then reverted the files, that would explain it.

Much depends on why the upgrade failed and what you did after that. If you missed schema updates despite it reporting 5.22.0 then you could hit problems later. For a test/dev box, upgrading to 5.26.0 should be ok. For a production box, I'd check further but that depends on the details of the failure and the subsequent actions.

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