Closed proimage closed 4 months ago
And if I run the "Re-save Fields" tool, it spits this out:
> Super Table field #409 re-saved ...
> Super Table field #440 re-saved ...
> Super Table field #445 re-saved ...
> Super Table field #455 re-saved ...
> Super Table field #458 re-saved ...
> Super Table field #463 re-saved ...
> Super Table field #467 re-saved ...
> Super Table field #517 re-saved ...
> Super Table field #520 re-saved ...
> Super Table field #523 re-saved ...
> Super Table field #528 re-saved ...
> Super Table field #530 re-saved ...
> Super Table field #543 re-saved ...
> Super Table field #568 re-saved ...
> Super Table field #594 re-saved ...
> Super Table field #603 re-saved ...
> Super Table field #621 re-saved ...
> Super Table field #628 re-saved ...
> Super Table field #637 re-saved ...
> Super Table field #639 skipped as it isn't a Super Table field ...
> Super Table field #649 skipped as it isn't a Super Table field ...
> Super Table field #653 skipped as it isn't a Super Table field ...
> Super Table field #654 skipped as it isn't a Super Table field ...
> Super Table field #650 re-saved ...
> Super Table field #664 re-saved ...
> Super Table field #669 re-saved ...
> Super Table field #647 re-saved ...
> Super Table field #648 re-saved ...
> Super Table field #683 skipped as it isn't a Super Table field ...
> Super Table field #688 re-saved ...
> Super Table field #691 re-saved ...
> Super Table field #698 re-saved ...
Field re-saving complete.
So some of that output is informational, that's fine. For the:
> ERROR: Blocktype field #639 is not a Super Table field ...
> ERROR: Blocktype field #649 is not a Super Table field ...
> ERROR: Blocktype field #653 is not a Super Table field ...
> ERROR: Blocktype field #654 is not a Super Table field ...
> ERROR: Blocktype field #683 is not a Super Table field ...
You'll need to manually fix these fields - you can head to /admin/settings/fields/edit/639
and check what fields these are?
It sounds like something has fixed up your field types.
639 is a Neo field. 649: Color Swatches 653: Redactor 654: Plain Text 683: Assets
How would I go about repairing those fields manually?
So that error usually means that at one point, these fields were Super Table fields, but were changed. Its not a massive issue, it just means there are some rows in your supertableblocktypes
table that are orphaned. You can delete any that match the field IDs above.
What was the original issue though? Are you still getting a error: Getting unknown property: craft\fields\Assets::contentTable
error? If so, can you provide the full stack trace of the error?
I've deleted those orphan lines and am still getting the error:
master@_____:/var/www/_______/htdocs$ ./craft project-config/sync --force=1
Applying changes from project.yaml ... error: Getting unknown property: craft\redactor\Field::contentTable
Trying to get the full stack trace now; do the ones from the original thread linked to in the first post here not suffice?
Found it:
2020-02-28 07:58:04 [-][-][-][trace][yii\db\Transaction::rollBack] Roll back transaction
2020-02-28 07:58:04 [-][-][-][error][yii\base\UnknownPropertyException] yii\base\UnknownPropertyException: Getting unknown property: craft\redactor\Field::contentTable in /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Component.php:154
Stack trace:
#0 /var/www/__________/htdocs/vendor/verbb/super-table/src/services/SuperTableService.php(370): yii\base\Component->__get('contentTable')
#1 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(872): verbb\supertable\services\SuperTableService->handleChangedBlockType(Object(craft\events\ConfigEvent))
#2 [internal function]: craft\services\ProjectConfig->craft\services\{closure}(Object(craft\events\ConfigEvent))
#3 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Object(Closure), Object(craft\events\ConfigEvent))
#4 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(559): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#5 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(866): craft\services\ProjectConfig->processConfigChanges('superTableBlock...')
#6 [internal function]: craft\services\ProjectConfig->craft\services\{closure}(Object(craft\events\ConfigEvent))
#7 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Object(Closure), Object(craft\events\ConfigEvent))
#8 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(559): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#9 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(950): craft\services\ProjectConfig->processConfigChanges('superTableBlock...')
#10 /var/www/__________/htdocs/vendor/craftcms/cms/src/services/ProjectConfig.php(441): craft\services\ProjectConfig->_applyChanges(Array)
#11 /var/www/__________/htdocs/vendor/craftcms/cms/src/console/controllers/ProjectConfigController.php(87): craft\services\ProjectConfig->applyYamlChanges()
#12 [internal function]: craft\console\controllers\ProjectConfigController->actionSync()
#13 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#14 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#15 /var/www/__________/htdocs/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction('sync', Array)
#16 /var/www/__________/htdocs/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('sync', Array)
#17 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('sync', Array)
#18 /var/www/__________/htdocs/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('project-config/...', Array)
#19 /var/www/__________/htdocs/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('project-config/...', Array)
#20 /var/www/__________/htdocs/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('project-config/...', Array)
#21 /var/www/__________/htdocs/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#22 /var/www/__________/htdocs/craft(22): yii\base\Application->run()
#23 {main}
@engram-design ^^^ :)
Sorry for the delay. So it still thinks this field is a Redactor field, and its trying to set stuff, where its assuming it'd be a Super Table field...
Something has clearly been borked with this one. Happy to pair program to sort this out for you, or at least get a bit more insight into what exactly is going on. Feel free to hit me up on the Craft Discord (handle crawf
)
Hello, I have a issue that is possibly connected to this one.
When I click "Check Content Table" I get this:
ERROR: #20 has inconsistent field settings in its project config ... ERROR: #37 has inconsistent field settings in its project config ...
both fields are the supertable-fieds, one consists of Redactor/Dropdown/Dropdown, the other is Asset/Asset/Plaintext.
After fix:
Super Table field #20 has content table {{%stc_headline}} ... Super Table field #37 has content table {{%stc_media}} ...
Fixes complete.
Pressing "Check" again it says everything is fine, No errors found.
When I then click "Re-save" it says:
Super Table field #37 re-saved ... Super Table field #20 re-saved ...
Field re-saving complete.
When I now click on "Check" again, the errors are back again..... :-(
Any suggestions what could be done to fix this?
@jbogendoerfer Interesting. These are just solo Super Table field, and not in or contain Matrix fields?
I would also throw a ./craft project-config/rebuild
in there before or after you do the content table checker. Basically that error just means that the database field settings don't quite match up with project config's values. It might be a false-positive so I'll try and replicate...
Hi,
the fields are inside a NEO-Field
running the command ./craft project-config/rebuild creates the errors again, when I check after the command the errors are here again.
I made a database backup before and after and compared the files, I think it has to do something with the insert into projectconfig.
To have a better view I just replaced ")" with newline, so you must imagine a closing ) at the end of each line. The right version is the version with the errors.
Let me test this with Neo's involvement, I haven't tested that out yet.
Continued from the issue on Craft's repo here: https://github.com/craftcms/cms/issues/5660
I've now run the Check Content Tables tool (didn't know about it before, cool!). Here's what it says:
First page is the check:
Then after clicking on "Fix Content Tables":
But then re-running the check & fix gives the same exact results, so I don't think it actually fixed anything. :-/