Skip to content

[5.x]: Applying project config with a new site addition (multisite) fails on environments with schema access disabled #16044

@justinholtweb

Description

@justinholtweb

What happened?

Description

We have a site where we have added a new site (multisite) and have failures applying the project config on remote environments where the schema mutation is disabled. It appears that Craft is trying to mutate the site yaml file for the new site when applying, but it is not clear what it is actually changing. I have recreated this behavior locally, and when then allowing schema mutation and letting it run successfully, no actual changes appear in Project Config files in the repo.

Steps to reproduce

  1. Add a new site, using ENV variables for the site URL values.
  2. Apply the project config on an environment with schema access disabled.
  3. See the failure.

Expected behavior

Project Config will apply and create the new site on the remote environment.

Actual behavior

The application of the project config schema fails when trying to apply the new site. The error is the generic "error: Changes to the project config are not possible while in read-only mode." Screenshots are attached of the error and of the file for that site in project config.

Notes:
As mentioned I was able to recreate this locally when my local schema access is disabled and when matching my local DB to the remote (pre-migration). The site is hosted on Servd and this causes a fatal error that pollutes the sites project config, requiring a backup application to restore the site. Image
Image

Craft CMS version

Craft Pro 5.4.10

PHP version

8.3.8

Operating system and version

No response

Database type and version

SQL 8.0.36

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions