Skip to content

Project config saves associative array data and comments inconsistently #10512

@BenParizek

Description

@BenParizek

Description

I hesitate to post this as I don't have a clean example to recreate the issue, but we've been seeing this cause conflicts regularly on a project for weeks (months?) and in my first complaints to someone outside our project about the problem they quickly said 'yes, I've seen that too'. So, seems like something is going on that I can't explain.

The issue has to do with project config being used within a team. Several different people are making local changes to the schema and pushing up changes on separate branches, as well as pulling down the most recent version of the project and re-syncing it to get the database in sync again. It's possible some of the issue, such as with some conflicts, could be caused by our workflow, but some of the issues just seem to be Craft changing things in different ways that we never intended to touch.

The two main issues I've seen, and can note that at least one other person outside our team has seen on a different projects are:

  1. Certain project config update workflows seem to add and remove the appended Field names in the project.yaml. So some updates flip flop between something like:
Sometimes:
4f410c45-a39d-48b6-96f1-9df22a0e44fb: 'Text ' # Text Field

Also sometimes:
4f410c45-a39d-48b6-96f1-9df22a0e44fb: 'Text '

I haven't noticed this one as recently so maybe a recent update improved it but it was happening for a while and the other person I spoke with also noted it happening to them.

  1. The associative array data seems to flip flop between being stored as a numeric array and a non-numeric array. I've described this scenario in this Stack Exchange post.

One thought I had about this scenario was that it may be custom field plugins, like Vizy, implementing the pack/unpack associative array behavior on field save differently than say Craft behaves when we do something like hit the Rebuild button in the Project Config Utility in the CP. But I haven't had time to dig in properly.

I'll try to update this if I get a more specific step-by-step-to-recreate example, but wanted to at least get this out there in case it's a known issue and we just aren't doing something the right way or in case anybody else can add more info from their own experiences.

Additional info

  • Craft version: Craft 3.7.32
  • PHP version: 7.4
  • Database driver & version: MySQL 5.7
  • Plugins & versions: Vizy 1.0.9 and several others but the problem seems to happen around Vizy fields sometimes, at least

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions