verbb / super-table

Super-charge your Craft workflow using Super Table.
MIT License
316 stars 47 forks source link

[5.0]The `cards` static Super Table field is no longer supported #554

Closed janhenckens closed 7 months ago

janhenckens commented 7 months ago

Describe the bug

While upgrading to Craft 5, I run into the following exception when running migrations:

*** applying m230511_000000_field_layout_configs Exception: The cards static Super Table field is no longer supported. Update any references from block.myField to block.one().myField. (/var/www/html/vendor/yiisoft/yii2/base/Component.php:180)

0 /var/www/html/vendor/verbb/super-table/src/fields/SuperTableField.php(59): craft\services\Deprecator->log('verbb\supertabl...', 'The cards sta...')

1 /var/www/html/vendor/yiisoft/yii2/base/Component.php(180): verbb\supertable\fields\SuperTableField->setStaticField(NULL)

I have Matrix field in which one of the blocks contains a "cards" field that is a SuperTable field - but it's not set to be "static".

I tried saving the matrix field again, rebuilding Project Config after that and starting the migration again but the error persists.

Checking the database, the fields table has these settings for the field in question:

{"blockTypeFields":0,"changedFieldIndicator":1952710440,"columns":{"17e175da-2340-4d79-a4e2-4bbd0dc7abf2":{"width":""},"d5cd968b-73a7-4149-84f2-04078f3a94e1":{"width":""},"98a0b2ca-7a84-466e-bf1f-b68b38e8b0c1":{"width":""}},"contentTable":"{{%stc_5_cards}}","fieldLayout":"table","maxRows":null,"minRows":null,"propagationKeyFormat":null,"propagationMethod":"all","selectionLabel":null,"staticField":null}

Happy to supply a database or project config if that helps!

Steps to reproduce

  1. Upgrade to Craft 5

Craft CMS version

5.0

Plugin version

4.0.0-beta.2

Multi-site?

Yes

Additional context

No response

janhenckens commented 7 months ago

Turns out I had throwExceptions on deprecations enabled :)