-
Notifications
You must be signed in to change notification settings - Fork 677
Description
What happened?
Description
After attempting to upgrading to Craft 5, we've noticed that when we try to edit certain fields from within a Entry Type layout UI, we get a "server error" toast notification. Checking the logs, we see this sort of thing:
[web.ERROR] [Error] Error: Class "doublesecretagency\spoon\models\BlockType" not found in /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php:246
Stack trace:
#0 /var/www/html/vendor/craftcms/cms/src/helpers/Cp.php(2970): craft\controllers\FieldsController->craft\controllers\{closure}()
#1 /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php(223): craft\helpers\Cp::metadataHtml()
#2 [internal function]: craft\controllers\FieldsController->actionEditField()
#3 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#4 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#5 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#6 /var/www/html/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction()
#7 /var/www/html/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction()
#8 /var/www/html/vendor/craftcms/cms/src/web/Application.php(318): yii\web\Application->handleRequest()
#9 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#10 /var/www/html/web/index.php(12): yii\base\Application->run()
#11 {main} {"memory":64503112,"exception":"[object] (Error(code: 0): Class \"doublesecretagency\\spoon\\models\\BlockType\" not found at /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php:246)"}
Looking at our database, at the fieldlayouts
table, we have 30 rows using that doublesecretagency\spoon\models\BlockType
type.
We had uninstalled Spoon months ago on our Craft 4 branch. Just to be sure, we have even tried rebuilding our Craft 5 upgrade branch after reinstalling Spoon and then uninstalling it in Craft 4. Those rows are still in the table.
This same error with the same stack trace also happens with fields that used to be associated with Neo... and we have 20 rows in the fieldlayouts
table with the type of benf\neo\elements\Block
. Again, we uninstalled Neo months ago in Craft 4.
[web.ERROR] [Error] Error: Class "benf\neo\elements\Block" not found in /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php:246
Stack trace:
#0 /var/www/html/vendor/craftcms/cms/src/helpers/Cp.php(2970): craft\controllers\FieldsController->craft\controllers\{closure}()
#1 /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php(223): craft\helpers\Cp::metadataHtml()
#2 [internal function]: craft\controllers\FieldsController->actionEditField()
#3 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#4 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#5 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#6 /var/www/html/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction()
#7 /var/www/html/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction()
#8 /var/www/html/vendor/craftcms/cms/src/web/Application.php(318): yii\web\Application->handleRequest()
#9 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#10 /var/www/html/web/index.php(12): yii\base\Application->run()
#11 {main} {"memory":64563624,"exception":"[object] (Error(code: 0): Class \"benf\\neo\\elements\\Block\" not found at /var/www/html/vendor/craftcms/cms/src/controllers/FieldsController.php:246)"}
Incidentally, when just trying to edit the field directly from within the Fields list in the CP, I don't get an error notification, but the same error is still logged.
I can tell you that I have tried to just see if I could get around this by updating those rows and replacing those types in the table with craft\elements\Entry
, and the errors go away and expected behavior seems to be happening. But, I don't even know if that's right. Was a shot in the dark I guess.
Steps to reproduce
- Know when field to test with, and an entry type that uses that field.
- Edit the entry type in the CP
- Click the menu icon next to the field in the layout UI and then click "edit field"
Expected behavior
Should be seeing the field edit UI slide in to view
Actual behavior
Just get a server error toast notification and an error logged.
Craft CMS version
5.5.6.1
PHP version
8.3.12
Operating system and version
No response
Database type and version
No response
Image driver and version
No response