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

[4.4.1]: Rebuilding project config removes transform upscale attributes #12879

Closed
domstubbs opened this issue Mar 13, 2023 · 3 comments
Closed
Assignees

Comments

@domstubbs
Copy link

domstubbs commented Mar 13, 2023

What happened?

Description

When I updated from 4.3.X to 4.4.1 I noticed upscale: false values were added to my project config files, but those values are being removed when I run subsequent rebuilds. If I try to apply the rebuilt config without the upscale values I get an SQL error.

Steps to reproduce

  1. Have a working env with upscale: true|false values inside imageTransforms YAML files
  2. Run craft project-config/rebuild
  3. Upscale attributes are removed
  4. Bonus points: run craft project-config/apply --force

Expected behavior

Rebuilding the config should retain upscale values and applying the config should work without issue/error.

Actual behavior

Values are lost and attempts to apply the now-incomplete config generate an SQL error:

- updating imageTransforms.9f574de2-546e-451a-bd02-c9ae9bcad72e ... 
error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'upscale' cannot be null
The SQL being executed was: UPDATE `craft_imagetransforms` SET `upscale`=NULL, `parameterChangeTime`='2023-03-13 16:42:19', `dateUpdated`='2023-03-13 16:42:19' WHERE `id`=7

Craft CMS version

4.4.1

PHP version

8.1

Operating system and version

No response

Database type and version

MySQL 8.0

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed for the next release.

@brandonkelly
Copy link
Member

4.4.2 is out with that fix.

@domstubbs
Copy link
Author

Great, thanks Brandon.

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

No branches or pull requests

2 participants