Closed davidwebca closed 6 months ago
I forgot to include the stack trace of the 500 error. Here you go:
TypeError: craft\helpers\Cp::elementChipHtml(): Argument #1 ($element) must be of type craft\base\ElementInterface, null given, called in storage/runtime/compiled_templates/4e/4e3a44f9723b1fb4bed1398c19bc667d.php on line 60 and defined in vendor/craftcms/cms/src/helpers/Cp.php:434
Stack trace:
#0 storage/runtime/compiled_templates/4e/4e3a44f9723b1fb4bed1398c19bc667d.php(60): craft\helpers\Cp::elementChipHtml(NULL, Array)
#1 vendor/twig/twig/src/Template.php(394): __TwigTemplate_0f72f6711d40f34b5f1e9f3f70a090a4->doDisplay(Array, Array)
#2 vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#3 vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#4 vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#5 vendor/twig/twig/src/Extension/CoreExtension.php(1347): Twig\TemplateWrapper->render(Array)
#6 storage/runtime/compiled_templates/da/da2687f066a2add134b4900789cebdf4.php(132): twig_include(Object(craft\web\twig\Environment), Array, '_elements/list....', Array)
#7 vendor/twig/twig/src/Template.php(394): __TwigTemplate_3f6145a1365dcf5ee66656a0a8abc156->doDisplay(Array, Array)
#8 vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#9 vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#10 vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#11 vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)
#12 vendor/craftcms/cms/src/web/View.php(482): Twig\Environment->render('_includes/forms...', Array)
#13 vendor/craftcms/cms/src/helpers/Cp.php(113): craft\web\View->renderTemplate('_includes/forms...', Array, 'cp')
#14 vendor/craftcms/cms/src/helpers/Cp.php(1176): craft\helpers\Cp::renderTemplate('_includes/forms...', Array)
#15 vendor/craftcms/cms/src/helpers/Cp.php(1809): craft\helpers\Cp::fieldHtml('template:_inclu...', Array)
#16 vendor/verbb/navigation/src/fieldlayoutelements/NodeTypeElements.php(59): craft\helpers\Cp::elementSelectFieldHtml(Array)
#17 vendor/craftcms/cms/src/models/FieldLayout.php(832): verbb\navigation\fieldlayoutelements\NodeTypeElements->formHtml(Object(verbb\navigation\elements\Node), false)
#18 vendor/craftcms/cms/src/web/View.php(1663): craft\models\FieldLayout->craft\models\{closure}()
#19 vendor/craftcms/cms/src/models/FieldLayout.php(831): craft\web\View->namespaceInputs(Object(Closure), NULL)
#20 vendor/craftcms/cms/src/controllers/ElementsController.php(923): craft\models\FieldLayout->createForm(Object(verbb\navigation\elements\Node), false, Array)
#21 vendor/craftcms/cms/src/controllers/ElementsController.php(397): craft\controllers\ElementsController->_prepareEditor(Object(verbb\navigation\elements\Node), false, true, Object(craft\web\Response), 'cp-screen-65927...', Object(Closure), Object(Closure), Object(Closure))
#22 [internal function]: craft\controllers\ElementsController->craft\controllers\{closure}(Object(craft\web\Response), 'cp-screen-65927...')
#23 vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(67): call_user_func(Object(Closure), Object(craft\web\Response), 'cp-screen-65927...')
#24 vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(48): craft\web\CpScreenResponseFormatter->_formatJson(Object(craft\web\Request), Object(craft\web\Response), Object(craft\web\CpScreenResponseBehavior))
#25 vendor/yiisoft/yii2/web/Response.php(1100): craft\web\CpScreenResponseFormatter->format(Object(craft\web\Response))
#26 vendor/craftcms/cms/src/web/Response.php(337): yii\web\Response->prepare()
#27 vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#28 vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#29 web/index.php(12): yii\base\Application->run()
#30 {main}
After further tests on this one, I gotta admit I'm suspecting more and more that what I have here is a problem with migrating from 2.0 to 3.0 (I did use some "nightlies" by loading directly from the git repos). It seems to be happening only with elements that were saved in prior versions, but if I add the exact same element with the same settings now, the bug doesn't happen anymore.
This bug might not happen to anyone else granted I might be the only one testing so early. 🤔 I'll close since the issue can be resolved now that I can delete elements thanks to #388 being fixed.
Ah I see, yeah nothing was stable at all in the dev-craft-5
branch until we released the betas, but we'll keep an eye on it.
Describe the bug
When trying to edit an element in a navigation, the slide-out menu appears but an error 500 is triggered.
Steps to reproduce
Craft CMS version
5.0.0-beta.5
Plugin version
3.0.0-beta.1
Multi-site?
Yes
Additional context
Here's the list of plugins I have in the same project right now.