-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hreflang is only working with standard robots all value in database #1399
Comments
Same issue here. Thats a bug.
[Edit] All instances of |
So forgive me, but I'm not sure I clearly understand the issue that's being described here by either of you. Do you have the sites set up in appropriate site groups as described here: https://nystudio107.com/docs/seomatic/technologies.html#multi-site-language-locale-support ? |
@Abromeit can you explain to me what you mean by this:
Why do you believe that this line is incorrect? https://github.com/nystudio107/craft-seomatic/blob/develop-v4/src/helpers/DynamicMeta.php#L565 |
@khalwat Thank you for your patience - Let me have another go at it. Maybe with a little more detail this time ;) Feedback on 1)So i just created a fresh Craft installation. Within, i created a new site-group and 2 sites for the languages: Next, i added a section / channel "Pages". Under "Content SEO > Pages" i changed "Robots" from "all" to "noindex". Lets add some pages. Some with the inherited / default setting of "noindex" and one where we want to override this default and indeed have the page indexed in search engines: Also notice that the pages shown above are created in both of our languages. Now lets open the "indexable page" entry and configure the override: At this point we successfully reproduced the error. I.e. hreflang Tags are missing on all pages, including the indexable one: Whereas when we switch things up, so that the channel default is "robots=all" and we set only the posts that we don't want indexed to "noindex" - everything works just fine. I.e. our indexable page has hreflang Tags: Feedback on 2)The robots property can contain multiple values. So i think (but am not sure) that We've had this in #1378 |
Thanks, that last post is much more clear, and I think it gives me a path forward to reproduce and fix this issue. I have not forgotten about this, it's on the list for the next update to SEOmatic. I've been working on porting SEOmatic to Craft 5, which is now done. Thanks for your patience. https://github.com/nystudio107/craft-seomatic/releases/tag/5.0.0-beta.2 |
@Abromeit thanks for that, pushed a fix for this, and you were exactly correct. It's a place I forgot to refactor when the value in the Going to look into the initial issue shortly. |
This is fixed. Craft CMS 3: You can try it now by setting your semver in your "nystudio107/craft-seomatic": "dev-develop as 3.4.70”, Then do a ….. Craft CMS 4: You can try it now by setting your semver in your "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.39”, Then do a ….. Craft CMS 5: You can try it now by setting your semver in your "nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0-beta.3”, Then do a |
Hello everybody,
Maybe we found a problem, maybe not..
Describe the bug
Let's say we have three sites:
Site 1: about us (home->about us)
Site 2: XX (home->xx)
Site 3: YY (home->yy)
On site 2 and 3 (in a round about 250 sites big project) we found out, that we are not able to print out hreflangs. I did a check and found out, that here the "noindex" is preventing the hreflang to come out. The db has "robots":"noindex" at the metaGlobalVars inside the seomatic_metabundles. So it seems to be correctly at this point.
Result on Front-End:
empty array for hreflangs: []
"seomatic.meta.mainEntityOfPage: WebSite"
"seomatic.meta.robots: noindex"
In the entries of that sites in SEO-Tab I changed the option "Robots override" to true and tried to add the option "all".
Result on Front-End:
still empty array for hreflangs: []
"seomatic.meta.mainEntityOfPage: WebSite"
"seomatic.meta.robots: all"
And now we come to our problem. For site 1 we made the changes and voila, we can control the output of hreflangs ( related to some tests with both languages ).
Result on Front-End WITHOUT Robots override (standard db: "robots":"all"):
filled hreflang = array:2 [▼]
"mainEntityOfPage: WebPage"
"robots: all"
Result on Front-End WITH Robots override to "noindex" (standard db: "robots":"all"):
filled hreflang = array:1 [▼] (still one language, because I did the change for test only on one lang)
"mainEntityOfPage: WebPage"
"robots: noindex"
So I checked further and found here out, that the standard process is to get the values out of database. Now comes the, for me, curious thing:
As I told the "robots":"noindex" is correctly inside the database with relating ids for the both buggy sites.
And for the working site the standard in db is "robots":"all".
Expected behaviour
If I override it, I would expect, that I get hreflang, depending on what I put into the field, but it only works if the standard value in database is at "all".
Versions
Questions
When get's the info about robots stored in the database?
How can I change it without manipulating directly in database?
And is there a mistake by myself?
Thanks for reading.
Hope everything is understandable
The text was updated successfully, but these errors were encountered: