craft-seomatic
craft-seomatic copied to clipboard
SEO Field not working properly for secondary sites
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:
- Add second site
- Add channel and single
- Add seomatic fields
- Try setting some default fields in content seo, and overwrite in both languages
Screenshots
Overwriting title for section single called «Homepage»
title output is still «Homepage»
Versions
- Plugin version: 4.0.0
- Craft version: 4.0.3
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?
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:
- 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
- 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?
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?
- Looks like the field was not properly set up after all on the second language, so that explains that one.
- This is still a bit buggy. Adding screenshots to explain more
Changed the SEO Title in the field (and preview is updated):
But meta title is not updated:
And field type is set to be translated for each language:
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?
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 | 首頁
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.