Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: v5 update changes project config files to schemaVersion 4.5.3.0 #16163

Closed
joepagan opened this issue Nov 20, 2024 · 1 comment
Closed
Labels

Comments

@joepagan
Copy link

joepagan commented Nov 20, 2024

What happened?

Description

🚨 update: I have re-run the update steps from craft4 and it appears to work perfectly. I think what has happened is that field-merge commands were run and bundled in the same commit which maybe disrupted the state of the project config changes.
This is probably not an issue now but I will leave this here incase you want to review it.

--- original post beneath

Sounds similar to #16086

I am trying to perform a craft update on a web app, from 4.12.8 to 5.5.0.1.

An environment has formerly run the craft update and pushed all those changes to a git branch, where a new dev checks out the branch, and run composer install, everything is ready for migrate/all to be run remotely on a craft4 database to bring that up to speed with the required changes.

After running migrate/all:

  • there are no errors in the output stream
  • the config/project/project.yaml has reverted to be suitable for craft4
  • the backend of craft appears to work perfectly, showing 5.5.0.1 at the bottom, with no project-config changes required
    Image
  • naturally after trying project-config/apply I get errors from craft and other plugins e.g. Craft CMS is installed with schema version of 5.5.0.0 while 4.5.3.0 was expected.

examples of project.yaml:

Before migrate/all

system:
  edition: pro
  live: true
  name: $APP_NAME
  retryDuration: null
  schemaVersion: 5.5.0.0
  timeZone: Europe/London

After migrate/all

system:
  edition: pro
  live: true
  name: $APP_NAME
  retryDuration: null
  schemaVersion: 4.5.3.0
  timeZone: Europe/London

Am I misunderstanding that this is the correct process?
Are we really meant to run through craft update steps on each remote environment if we want to avoid a database freeze while we are updating?
What if other project yaml changes have been performed e.g. field merges etc? (I appreciate this may need to be done separately anyway but it's not obvious if this will be problematic)

Some clarity on this would be great, thanks.

Edit, just seen you suggest running craft up now, I've tried this but get the same result:

49 migrations were applied.
Migrated up successfully.
Your project config files were created for different versions of Craft and/or plugins than what’s currently installed.
Craft CMS is installed with schema version of 5.5.0.0 while 4.5.3.0 was expected.
...

Steps to reproduce

  1. import craft4 db
  2. ensure app files are for 5.5.0.1
  3. run craft migrate/all
  4. review project.yaml and see differences or try run craft project-config/apply

Expected behavior

project.yaml contains correct version after migrate/all

Actual behavior

project.yaml contains v4 version after migrate/all

Craft CMS version

"craftcms/cms": "5.5.0.1",

PHP version

8.2

Operating system and version

macos 14.6.1/ddev/but remote too

Database type and version

mysql 8.0

Image driver and version

No response

Installed plugins and versions

"require": {
"craftcms/ckeditor": "4.4.0",
"craftcms/cms": "5.5.0.1",
"goldinteractive/craft-sitecopy": "2.1.1",
"mmikkel/cp-field-inspect": "2.0.2",
"mutation/translate": "4.0.2",
"nystudio107/craft-retour": "5.0.3",
"nystudio107/craft-seomatic": "5.1.6",
"nystudio107/craft-vite": "5.0.1",
"presseddigital/linkit": "5.0.0",
"servd/craft-asset-storage": "4.0.9",
"spicyweb/craft-neo": "5.2.15",
"studioespresso/craft-scout": "5.0.1",
"verbb/formie": "3.0.12",
"verbb/navigation": "3.0.5",
"vlucas/phpdotenv": "5.6.1",
"wbrowar/craft-admin-bar": "5.0.0",
"yiisoft/yii2-redis": "2.0.18"
},

@joepagan joepagan added the bug label Nov 20, 2024
@joepagan
Copy link
Author

I can confirm that trashing the release files and starting a fresh update from an untouched craft4 branch resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant