Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Unknown property error when upgrading to Craft 4 #407

Closed
watchwood opened this issue Mar 5, 2024 · 1 comment
Closed

Unknown property error when upgrading to Craft 4 #407

watchwood opened this issue Mar 5, 2024 · 1 comment
Labels

Comments

@watchwood
Copy link

I'm getting the following error when trying to migrate my web site from Craft 3 to Craft 4:

[yii\base\UnknownPropertyException] yii\base\UnknownPropertyException: Setting unknown property: nystudio107\seomatic\models\MetaScript::deprecated in /home/vagrant/code/vendor/yiisoft/yii2/base/Component.php:209
Stack trace:
#0 /home/vagrant/code/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\Component->__set()
#1 /home/vagrant/code/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure()
#2 /home/vagrant/code/vendor/craftcms/cms/src/base/Model.php(78): yii\base\BaseObject->__construct()
#3 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/models/MetaScript.php(95): craft\base\Model->__construct()
#4 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/models/MetaScriptContainer.php(154): nystudio107\seomatic\models\MetaScript::create()
#5 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/base/Container.php(45): nystudio107\seomatic\models\MetaScriptContainer->normalizeContainerData()
#6 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/models/MetaBundle.php(229): nystudio107\seomatic\base\Container::create()
#7 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/models/MetaBundle.php(144): nystudio107\seomatic\models\MetaBundle->normalizeMetaBundleData()
#8 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/services/MetaBundles.php(154): nystudio107\seomatic\models\MetaBundle::create()
#9 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/services/MetaContainers.php(504): nystudio107\seomatic\services\MetaBundles->getGlobalMetaBundle()
#10 /home/vagrant/code/vendor/nystudio107/craft-seomatic/src/twigextensions/SeomaticTwigExtension.php(58): nystudio107\seomatic\services\MetaContainers->loadGlobalMetaContainers()
#11 /home/vagrant/code/vendor/twig/twig/src/ExtensionSet.php(320): nystudio107\seomatic\twigextensions\SeomaticTwigExtension->getGlobals()
#12 /home/vagrant/code/vendor/twig/twig/src/Environment.php(783): Twig\ExtensionSet->getGlobals()
#13 /home/vagrant/code/vendor/twig/twig/src/Environment.php(796): Twig\Environment->getGlobals()
#14 /home/vagrant/code/vendor/twig/twig/src/Template.php(367): Twig\Environment->mergeGlobals()
#15 /home/vagrant/code/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#16 /home/vagrant/code/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#17 /home/vagrant/code/vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render()
#18 /home/vagrant/code/vendor/craftcms/cms/src/web/View.php(482): Twig\Environment->render()
#19 /home/vagrant/code/vendor/craftcms/cms/src/web/View.php(535): craft\web\View->renderTemplate()
#20 /home/vagrant/code/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(57): craft\web\View->renderPageTemplate()
#21 /home/vagrant/code/vendor/yiisoft/yii2/web/Response.php(1100): craft\web\TemplateResponseFormatter->format()
#22 /home/vagrant/code/vendor/craftcms/cms/src/web/Response.php(337): yii\web\Response->prepare()
#23 /home/vagrant/code/vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#24 /home/vagrant/code/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#25 /home/vagrant/code/public/index.php(23): yii\base\Application->run()
#26 {main} {"memory":6522480,"exception":"[object] (yii\base\UnknownPropertyException(code: 0): Setting unknown property: nystudio107\seomatic\models\MetaScript::deprecated at /home/vagrant/code/vendor/yiisoft/yii2/base/Component.php:209)"}

This is with CraftCMS 4.8.0 and Seomatic 4.0.42

@watchwood watchwood added the bug label Mar 5, 2024
@khalwat
Copy link
Collaborator

khalwat commented Mar 5, 2024

This is the wrong repository, this is the repository for the old deprecated Craft 2 SEOmatic plugin.

Regardless, I don't think you actually have SEOmatic 4.0.42 installed; try removing it from vendor/nystudio107/craft-seomatic/ and then do:

composer require nystudio107/craft-seomatic

@khalwat khalwat closed this as completed Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants