Skip to content

[5.x]: Generated project config values differ between saving entry type and using pc/rebuild #16266

@sweetroll

Description

@sweetroll

What happened?

Description

The icon and titleFormat values switch between an empty string and null depending on how the yaml file has been updated. Saving an entry type via the CMS results in empty string values (if no value has been input) and running pc/rebuild via the CLI changes them to null. This may be the case with other keys too but cannot confirm.

Not the biggest issue in the world but it results in unnecessary file commits and scares the juniors.

Steps to reproduce

  1. Create an entry type without setting an icon or title format. Note the values generated in the corresponding yaml
  2. Run pc/rebuild on the CLI and see the values switch to null.

Expected behavior

Pick whatever value is appropriate and have it output for all save methods.

Craft CMS version

5.5.4

PHP version

8.3

Operating system and version

Mac OS 14.5 (using ddev)

Database type and version

MySQL 8.0

Image driver and version

No response

Installed plugins and versions

"craftcms/aws-s3": "2.2.1",
"craftcms/ckeditor": "4.4.0",
"craftcms/cms": "5.5.4",
"nystudio107/craft-imageoptimize": "5.0.3",
"nystudio107/craft-seomatic": "5.1.7",
"nystudio107/craft-vite": "5.0.1",
"nystudio107/craft-webperf": "5.0.0",
"putyourlightson/craft-blitz": "5.9.6",
"putyourlightson/craft-sprig": "3.5.1",
"verbb/expanded-singles": "3.0.1",
"verbb/formie": "3.0.14",
"verbb/hyper": "2.2.1",
"verbb/navigation": "3.0.5",
"verbb/tablemaker": "^5.0.3",
"verbb/timber": "2.0.2",
"vlucas/phpdotenv": "^5.6.0"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions