nystudio107/seomatic

Trying to get property 'sourceName' of non-object when clicking breadcrumb in seo content

Closed this issue · 3 comments

Seomatic plugin version 3.3.5
Craft cms version 3.4.15

Issue:

I have a multi site setup. I click Seomatic in the CP's left sidebar, bringing me to: admin/seomatic

Then I click "Content SEO", bringing me to: admin/seomatic/content

I select "United States" from the dropdown that appears to the right of heading: Content SEO, bringing me to: admin/seomatic/content/en_us
Screen Shot 2020-05-29 at 11 21 20 AM

It displays a table listing, I click on an item Products, bringing me to: admin/seomatic/edit-content/general/section/products/en_us
Screen Shot 2020-05-29 at 11 22 35 AM

Then I click the "Products - General" breadcrumb at the top of the page, it is the third link to the right of the hamburger link in the top right
Screen Shot 2020-05-29 at 11 23 27 AM

Which now brings me to: admin/seomatic/edit-content/general/section/products

with an error of: Trying to get property 'sourceName' of non-object
Screen Shot 2020-05-29 at 11 25 53 AM

I checked what site id ($siteIdToLoad) it was using on line 474 of SettingsController.php and it was using site id 1, when I set it to 2, it worked as expected.

Here is a screenshot from the craft_sites table:
Screen Shot 2020-05-29 at 11 28 57 AM

If I modify the url to: admin/seomatic/edit-content/general/section/products/en_us

then it works.

@bkmorse You posted in the Craft 2 version of this plugin. I found this because I'm having a similar issue with a multisite build. Did you resolve this?

@sjcallender I did not, I did not realize I added it to craft cms version 2 of this. I'll post this to the craft cms 3 version, thanks!

Added the issue, follow here nystudio107/craft-seomatic#689