nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

Unable to view "Site Settings" tab in control panel #1476

Closed benfeather closed 6 months ago

benfeather commented 6 months ago

Describe the bug

When I browse to the site settings tab under SEOmatic I get this error:

TypeError: craft\helpers\Cp::elementChipHtml(): Argument #1 ($element) must be of type craft\base\ElementInterface, null given, called in /var/www/html/storage/runtime/compiled_templates/f5/f5060ede09e18bdf77577a78a17272d6.php on line 60 and defined in /var/www/html/vendor/craftcms/cms/src/helpers/Cp.php:445
Stack trace:
#0 /var/www/html/storage/runtime/compiled_templates/f5/f5060ede09e18bdf77577a78a17272d6.php(60): craft\helpers\Cp::elementChipHtml(NULL, Array)
#1 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_003e512c6cdaccc2d143c9456bbcee04->doDisplay(Array, Array)
#2 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#3 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#4 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#5 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1347): Twig\TemplateWrapper->render(Array)
#6 /var/www/html/storage/runtime/compiled_templates/0e/0e63c4d1929a264bb59227fe1be2eb47.php(132): twig_include(Object(craft\web\twig\Environment), Array, '_elements/list....', Array)
#7 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_d8c01b5aed02b32cf7676946ec74cc77->doDisplay(Array, Array)
#8 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#9 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#10 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#11 /var/www/html/vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)
#12 /var/www/html/vendor/craftcms/cms/src/web/View.php(482): Twig\Environment->render('_includes/forms...', Array)
#13 /var/www/html/vendor/craftcms/cms/src/helpers/Cp.php(113): craft\web\View->renderTemplate('_includes/forms...', Array, 'cp')
#14 /var/www/html/vendor/craftcms/cms/src/helpers/Cp.php(1179): craft\helpers\Cp::renderTemplate('_includes/forms...', Array)
#15 /var/www/html/vendor/craftcms/cms/src/web/twig/variables/Cp.php(1070): craft\helpers\Cp::fieldHtml('template:_inclu...', Array)
#16 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1635): craft\web\twig\variables\Cp->field('template:_inclu...', Array)
#17 /var/www/html/vendor/craftcms/cms/src/helpers/Template.php(141): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\web\twig\variables\Cp), 'field', Array, 'method', false, false, false, 195)
#18 /var/www/html/storage/runtime/compiled_templates/10/10a8137fcf8e50487e61e0df48de3681.php(1257): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\web\twig\variables\Cp), 'field', Array, 'method', false, false, false, 195)
#19 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1224): __TwigTemplate_22c8f4f0ef8a0fde5f9e208e8f37ddf9->macro_field(Array, 'template:_inclu...')
#20 /var/www/html/storage/runtime/compiled_templates/10/10a8137fcf8e50487e61e0df48de3681.php(1912): twig_call_macro(Object(__TwigTemplate_22c8f4f0ef8a0fde5f9e208e8f37ddf9), 'macro_field', Array, 354, Array, Object(Twig\Source))
#21 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1224): __TwigTemplate_22c8f4f0ef8a0fde5f9e208e8f37ddf9->macro_elementSelectField(Array)
#22 /var/www/html/storage/runtime/compiled_templates/b9/b9acc4ef9d79f5bfd157c86f50e8e729.php(134): twig_call_macro(Object(__TwigTemplate_22c8f4f0ef8a0fde5f9e208e8f37ddf9), 'macro_elementSe...', Array, 75, Array, Object(Twig\Source))
#23 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_79e8f03952b1e3d3ab55db65e6073f61->doDisplay(Array, Array)
#24 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#25 /var/www/html/storage/runtime/compiled_templates/f2/f25b3074750983120f2f49c8bf1e5189.php(101): Twig\Template->display(Array)
#26 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_b6d21c4043ae6d978d98bd138ef9e3ea->doDisplay(Array, Array)
#27 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#28 /var/www/html/storage/runtime/compiled_templates/75/75f706a98749db52187aedfb3a8c4d0d.php(127): Twig\Template->display(Array)
#29 /var/www/html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_1f4fb6257da11a3492b8a82e794527cf->block_content(Array, Array)
#30 /var/www/html/storage/runtime/compiled_templates/a8/a85c35e99637b921d8a05f7f5c7a219d.php(667): Twig\Template->displayBlock('content', Array, Array)
#31 /var/www/html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_6c5e96285db93e2ce7f227ebb1f1a339->block_main(Array, Array)
#32 /var/www/html/storage/runtime/compiled_templates/a8/a85c35e99637b921d8a05f7f5c7a219d.php(399): Twig\Template->displayBlock('main', Array, Array)
#33 /var/www/html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_6c5e96285db93e2ce7f227ebb1f1a339->block_body(Array, Array)
#34 /var/www/html/storage/runtime/compiled_templates/f6/f699ed1834a646600eaeaf2bc2b6076f.php(97): Twig\Template->displayBlock('body', Array, Array)
#35 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_95f5d80e975e6804944695ab4c81badf->doDisplay(Array, Array)
#36 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#37 /var/www/html/storage/runtime/compiled_templates/5a/5a1a92ee9aa3345852fa939caa6f10ed.php(56): Twig\Template->display(Array, Array)
#38 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_21e2affb86c813d3414d6688a708f0d5->doDisplay(Array, Array)
#39 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#40 /var/www/html/storage/runtime/compiled_templates/a8/a85c35e99637b921d8a05f7f5c7a219d.php(170): Twig\Template->display(Array, Array)
#41 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_6c5e96285db93e2ce7f227ebb1f1a339->doDisplay(Array, Array)
#42 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#43 /var/www/html/storage/runtime/compiled_templates/25/25b659bd53e06e2f97ce23682fa7c2f1.php(43): Twig\Template->display(Array, Array)
#44 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_f81eeeeeacc5a49f508bbacff366e998->doDisplay(Array, Array)
#45 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#46 /var/www/html/storage/runtime/compiled_templates/bb/bb3505e01e321039c00d2079bbc23653.php(74): Twig\Template->display(Array, Array)
#47 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_52ac379f4f0e9ba8a5f7acce229e2ff8->doDisplay(Array, Array)
#48 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#49 /var/www/html/storage/runtime/compiled_templates/75/75f706a98749db52187aedfb3a8c4d0d.php(48): Twig\Template->display(Array, Array)
#50 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_1f4fb6257da11a3492b8a82e794527cf->doDisplay(Array, Array)
#51 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#52 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#53 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#54 /var/www/html/vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)
#55 /var/www/html/vendor/craftcms/cms/src/web/View.php(482): Twig\Environment->render('seomatic/settin...', Array)
#56 /var/www/html/vendor/craftcms/cms/src/web/View.php(535): craft\web\View->renderTemplate('seomatic/settin...', Array)
#57 /var/www/html/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(57): craft\web\View->renderPageTemplate('seomatic/settin...', Array, 'cp')
#58 /var/www/html/vendor/yiisoft/yii2/web/Response.php(1100): craft\web\TemplateResponseFormatter->format(Object(craft\web\Response))
#59 /var/www/html/vendor/craftcms/cms/src/web/Response.php(338): yii\web\Response->prepare()
#60 /var/www/html/vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#61 /var/www/html/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#62 /var/www/html/web/index.php(12): yii\base\Application->run()
#63 {main}

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

benfeather commented 6 months ago

Uninstall and reinstalling the plugin seemed to fix the issue.

khalwat commented 5 months ago

This bug is the same as:

https://github.com/nystudio107/craft-seomatic/issues/1472

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.4.78”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.50”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.4”,

Then do a composer clear-cache && composer update