craft-seomatic icon indicating copy to clipboard operation
craft-seomatic copied to clipboard

SEO Field not working properly for secondary sites

Open peirix opened this issue 2 years ago • 7 comments

Describe the bug

We have a multisite setup with seomatic and seomatic fields on each page. It seems that the seomatic fields are not working properly on the pages for the secondary site. For the homepage section (single) we're not able to overwrite any of the fields, and for the channel section entries it seems like it's not inheriting properly from the Content SEO settings (not getting the default seo image, for instance)

To reproduce

Steps to reproduce the behaviour:

  1. Add second site
  2. Add channel and single
  3. Add seomatic fields
  4. Try setting some default fields in content seo, and overwrite in both languages

Screenshots

image Overwriting title for section single called «Homepage»

image title output is still «Homepage»

Versions

  • Plugin version: 4.0.0
  • Craft version: 4.0.3

peirix avatar Jun 01 '22 10:06 peirix

I'm a little confused with your description; you talk about not inheriting from Content SEO settings, but then discuss SEO Settings fields? Can you elaborate on your exact setup/issue?

khalwat avatar Jun 01 '22 16:06 khalwat

Yeah, was maybe a bit poorly written, as these are really two separate issues, but they are both related to having a second language/site.

So the two issues are as following:

  1. Pages in the second site don't seem to inherit from the fields set in the Content SEO. So we have a default SEO image set for one of our entry types, but they are not added to the page in the second language, only the first (default site) language
  2. The SEOmatic field does not allow fields to be overwritten in the second language. So trying to overwrite the SEO title field works only for the default language site, but not for the second language.

Hope that explained it a bit more?

peirix avatar Jun 02 '22 08:06 peirix

Regarding 1. -- the Content SEO settings should be on a per-site basis. Do you have them set properly for both sites? Screenshots would help.

Regarding 2. -- do you have that SEO Settings field set to propagate properly to both sites?

khalwat avatar Jun 03 '22 04:06 khalwat

  1. Looks like the field was not properly set up after all on the second language, so that explains that one.
  2. This is still a bit buggy. Adding screenshots to explain more

Changed the SEO Title in the field (and preview is updated): image

But meta title is not updated: image

And field type is set to be translated for each language: image

peirix avatar Jun 03 '22 10:06 peirix

That screenshot is not showing the SEO Title, it's showing the Open Graph Title. Perhaps you need to include that field as well in your SEO Settings field?

khalwat avatar Jun 09 '22 22:06 khalwat

Oh, I just included that screenshot because I thought Open Graph Title also pulled from the SEO Title Source. The title tag looked like this: CrayoNano | 首頁

peirix avatar Jun 10 '22 07:06 peirix

Going back to check it now, I see that it had changed to the overwritten property. So upon a little more digging it seems it was related to cache. Changing the SEO fields doesn't clear the cache. But if I go in and manually clear the SEOmatic metadata caches it will show the updated text.

peirix avatar Jun 10 '22 07:06 peirix