I'm making a post about this as a form of documentation of an issue I ran into while upgrading one of my sites to Craft4.

I followed the upgrade instructions and got the site upgraded to the latest Craft3 version with 100% mirrored instances on both the production server and my local dev environment with identical copies of the database. This was my starting point.

I rebuilt the project config as instructed even though the two databases were identical so this step probably wasn't needed.

I updated the composer.json file and set craft to version ^4.0.0 as instructed, along with the new plugin versions as specified by the upgrading to craft 4 panel in the utilities section of the CP.

I then ran composer update and then php craft migrate/all with yes answers to all prompts.

The migrations ran successfully.

At this point I was able to log in and go through the site and tweak my module controllers / elements / models etc to be compatible with the Craft4 changes. Everything tested out correctly.

When it was time to deploy to the the server I committed my code changes along with the updated composer.json and composer.lock files, and pushed all changes to the production site using git.

On the sever shell I ran composer install and php craft migrate/all with all yes answers just like on my local copy.

All of the migrations appeared to complete successfully.

Admin area working OK. Project config update changes detected -> apply all changes -> Completed successfully.

Actual live site is broken, 500 error. OK... I set the environment to dev temporarily and reload the page and I see the error is to do with the new filesystem on the assets being loaded in the home page template.

I go in the admin and I check the filesystems and nothing has been created. I check my local copy of the site admin, all of the file systems were there, created as part of the upgrade process automatically.

I had to manually create and each file system and assign them to the corresponding volumes on the live site to get the live site functioning.

Does anyone know why this happened? Shouldn't the filesystems have been created on the live server database when I ran the migrations after composer install - that appears to be when they were created on my local copy... Even if that didn't happen there, I would think the project config update would have taken care of it. Either way it didn't happen and it caused a me some grief. I would like to know if I did something wrong or to report this as a bug if not.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.