Cms: project.yaml schema version mismatch errors, but the version numbers match

Created on 26 Sep 2019  路  3Comments  路  Source: craftcms/cms

Description

I am getting the following errors:

Your project.yaml file was created for different versions of Craft and/or plugins than what鈥檚 currently installed.

Craft CMS currently installed has the schema version of 3.3.3 (expected 3.2.16)
Rollbar currently installed has the schema version of 1.0.0 (expected 3.0.4)
Submissions currently installed has the schema version of 1.0.0 (expected 2.1.0)
Try running composer install from your terminal to resolve.

Running composer install has no effect.
Deleting the vendor folder then running composer install has no effect.

When I look at my project.yaml file, for example, Craft CMS is installed with the correct schema version; there is no mention of 3.3.3 in the whole file:

system:
  edition: pro
  live: true
  name: ECL
  timeZone: Europe/London
  schemaVersion: 3.2.16

Rollbar and Submissions are two of our custom plugins which we install through our VCS, but the schema versions in project.yaml are what the error message says it's expecting:

  submissions:
    settings: null
    licenseKey: null
    enabled: '1'
    schemaVersion: 2.1.0
  rollbar:
    settings: null
    licenseKey: null
    enabled: '1'
    schemaVersion: 3.0.4

Could this be an issue with installing plugins from a private instance of GitLab, which is where Submissions and Rollbar are stored?

Additional info

  • Craft version: 3.3.4.1
  • PHP version: 7.3.8
  • Database driver & version: MySQL 5.7.24

Most helpful comment

Had the same issue. It was because the schemaVersion in the database mismatched with the version specified in config/project.yaml.

Solved it like this:

  1. Make sure you DB table info table has the same version and schemaVersion as defined in the config/project.yaml
  1. then run
    $ rm -rf vendor
    $ composer clearcache
    $ composer install

All 3 comments

When I look at my project.yaml file, for example, Craft CMS is installed with the correct schema version; there is no mention of 3.3.3 in the whole file

Right. The error is saying that project.yaml as it stands is expecting Craft to be installed with a schema version set to 3.2.16, based on the fact that system.schemaVersion in project.yaml is set to 3.2.16 as you demonstrated.

The last release where the schemaVersion was set to 3.2.16 was version Craft 3.2.10:

https://github.com/craftcms/cms/blob/620fa9e16ae1d6d205868754959c459f55128da2/src/config/app.php#L6-L7

So you could try rolling back to Craft 3.2.10; and also update your Rollbar and Submissions plugins to whatever versions where the schemaVersion matches what project.yaml is expecting (3.0.4 and 2.1.0, respectively).

As to how you got in this state in the first place, perhaps there was a failed update that wasn鈥檛 dealt with properly or something, not really sure. This error occurs whenever there are pending project.yaml changes but the locally installed versions don鈥檛 match up with the versions recorded in project.yaml. (So Craft isn鈥檛 feeling confident that the installed version of Craft & plugins are going to be able to accurately handle the incoming project.yaml changes.)

Had the same issue. It was because the schemaVersion in the database mismatched with the version specified in config/project.yaml.

Solved it like this:

  1. Make sure you DB table info table has the same version and schemaVersion as defined in the config/project.yaml
  1. then run
    $ rm -rf vendor
    $ composer clearcache
    $ composer install

I keep getting this error every now and then. It often happens if I update to a bigger release (going from 3.4.X to 3.5.X for instance) locally, do a few changes to fields, and then deploy everything to production. Whenever the Your project.yaml file was created for different versions of Craft and/or plugins than what鈥檚 currently installed. occur I do the following.

  1. On production, I rebuild the config based on the content in the db (I do this from the CP (admin/utilities/project-config), not sure what the bash command would be to do this task). If you're running an auto deployment with a git branch, you might have to stash these changes.
  2. I do the same locally. When I push the newly build config files to the production environment, everything should be in order, both for versions and yaml content.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

leigeber picture leigeber  路  3Comments

michaelhue picture michaelhue  路  3Comments

richhayler picture richhayler  路  3Comments

timkelty picture timkelty  路  3Comments

mattstein picture mattstein  路  3Comments