craftcms / cms

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

[4.x]: #11803

Open bob-pixeldeluxe opened 2 years ago

bob-pixeldeluxe commented 2 years ago

What happened?

We are building a new website with a clean database (not upgraded from craft 3) So i want to add a field to a section. The field is a matrix with some building blocks. However when i save the section i get the following error:

array_key_exists(): Argument #2 ($array) must be of type array, string given

After this i cannot remove the field anymore from the section after saving the field is still there withouth error its just back again after moving it. If i open the edit page of this entry i get the following error:

TypeError: array_key_exists(): Argument #2 ($array) must be of type array, string given in /var/www/html/vendor/craftcms/cms/src/fields/Table.php:416

Steps to reproduce

  1. place a matrix in an entry (This did work before for us since we managed to do it at the start of the week we have updated in between) The only plugin we used in this matrix is linkfield which caused no problems in another project we are working on.

Expected behavior

Actual behavior

Craft CMS version

4.2.1.1

PHP version

8.1.8

Operating system and version

No response

Database type and version

MySQL 10.4.25

Image driver and version

No response

Installed plugins and versions

    "craftcms/cms": "4.2.1.1",
    "vlucas/phpdotenv": "^5.4.0",
    "craftcms/feed-me": "5.0.4",
    "craftcms/redactor": "^3.0",
    "doublesecretagency/craft-siteswitcher": "2.3.0",
    "mmikkel/child-me": "1.3.1",
    "mmikkel/cp-field-inspect": "1.4.4",
    "nystudio107/craft-retour": "4.0.2",
    "nystudio107/craft-seomatic": "4.0.7",
    "putyourlightson/craft-blitz": "4.2.1",
    "sebastianlenz/linkfield": "2.1.4",
    "solspace/craft-freeform": "4.0.0",
    "topshelfcraft/wordsmith": "4.0.1",
    "verbb/super-table": "3.0.0",
    "verbb/expanded-singles": "2.0.0",
    "verbb/field-manager": "3.0.2",
    "verbb/knock-knock": "2.0.0",
    "wrav/oembed": "2.2.1",
    "carlcs/craft-redactorcustomstyles": "^4.0"
bob-pixeldeluxe commented 2 years ago

Also I cannot see this change in the yaml files. So in my database the field is in the section but git wise there are no changes.

brandonkelly commented 2 years ago

Search for that Argument #2 ($array) must be of type array, string given error in storage/logs/. There should be a full stack trace that follows it. Please post it here.