craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

[4.x]: Matrix Field can't save new fields #12917

Open kaspar-allenbach opened 1 year ago

kaspar-allenbach commented 1 year ago

What happened?

Description

If I save a Matrix field twice, the new fields are gone.

I've migrated a craft 3 install to craft 4 some time ago and it is very janky.

I have a matrix field which at first glance lets me edit and add new fields. But if I go into the field settings a second time, all new fields are gone.

See here:

Steps to reproduce

  1. Open the field settings of a matrix field
  2. Create a new field
  3. Save
  4. Open the field again
  5. The new field is gone

See here: https://somup.com/c0ebl1y5wF

Bildschirmfoto 2023-03-17 um 13 27 39

When I check craft_matrixblocktypes in the db these fields have a fieldLayoutId value of NULL. Does this have anything to do with it?

Bildschirmfoto 2023-03-17 um 13 24 42

Craft CMS version

4.4.3

PHP version

8.8.1

brandonkelly commented 1 year ago

When I check craft_matrixblocktypes in the db these fields have a fieldLayoutId value of NULL. Does this have anything to do with it?

Sure seems like it.

What types of fields are these? What plugin is providing them?

kaspar-allenbach commented 1 year ago

These are just the text and the regular standard url fields within a matrix field. No plugins involved

brandonkelly commented 1 year ago

Do you have any custom plugins/modules installed that could be interfering with the field saves?

kaspar-allenbach commented 1 year ago

I tried it directely on the production server and it's the same behaviour

kaspar-allenbach commented 1 year ago

There is a second filed in ieach block type. A Supertable field. Maybe this is affecting it. idk

brandonkelly commented 1 year ago

Are you able to send your database backup and Composer files into support@craftcms.com? If so we can look into it from there.