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
162 stars 68 forks source link

Problem with $element that is not set #1387

Closed martinhellwagner closed 7 months ago

martinhellwagner commented 7 months ago

Describe the bug

In the function $this->setMatchedElement($uri, $siteId); that is called in line 364 in the file MetaContainers.php and that is implemented starting on line 457 in the same file, the variable $element can't be found and is not set – that's why we're getting a server error (see screenshot).

Shouldn't there be something like $element = null; for the case that the variable $element can't be set?

To reproduce

Steps to reproduce the behaviour: Click on an element in the Control Panel

Expected behaviour

Server error should not appear

Screenshots

Screenshot 2023-11-20 at 10 46 10

Versions

khalwat commented 7 months ago

This was already fixed; please update to the latest SEOmatic -> https://github.com/nystudio107/craft-seomatic/releases/tag/3.4.66

martinhellwagner commented 7 months ago

Sweet, thanks! 🙏🏼