- Issue created by @scambler
- πͺπΈSpain solanas
Same problem here.
I'm on a new and clean Drupal 10.4.4. I only have installed yoast_seo 8.x-2.1.
I don't know how to debug this. May the problem is that this link is in the "Breadcrum".
- π§π¦Bosnia and Herzegovina drale01 Sarajevo
Iβm experiencing the same issue β no matter what I do, it always shows βYou're linking to another page with the focus keywordβ as flagged.
- First commit to issue fork.
- Merge request !40Issue #3503405: "You're linking to another page with the focus keyword" is always flagged. β (Closed) created by Unnamed author
- π³π±Netherlands borisr
I ran into the same issue and after some debugging I found that the modules sets the 'in_preview' flag to true for nodes. Setting the 'preview_view_mode' variable to the correct view mode seems to resolve the issue.
- π³π±Netherlands borisr
I've done some more testing, and it seems that adding a link within the node also triggers the message "You're linking to another page with the focus keyword" regardless of the link content. This happens when the rendering theme wraps the node with an tag. Replacing the article tag fixes this issue.
I'm not sure if there are related/known issues, or if this is intentional.
Perhaps removing the article tag during rendering might solve it (although I'm not usually a fan of manipulating these kinds of things).
-
kingdutch β
committed 05c257b6 on 8.x-2.x
Issue #3503405 by borisr, solanas, scambler, drale01: 'You're linking to...
-
kingdutch β
committed 05c257b6 on 8.x-2.x
- π³π±Netherlands kingdutch
Thanks for the investigation and proposed fix borisr! I've added a line to test coverage to test for the bug and merged your fix.
- π³π±Netherlands borisr
@kingdutch thanks! What are your thoughts on the issue with the tags? I'am not sure if the module should handle this but on the other side (or if this is actually working as intended) but most default templates are wrapping the node in an tag.
- π³π±Netherlands kingdutch
Lets spin that out to a separate issue. I'm not entirely sure what you mean by "article" tag, so I'd like to discuss that separately. Also because then we can write a more specialised test to demonstrate the issue :D
- π³π±Netherlands borisr
That seems like a good idea. I just create a new issue (see https://www.drupal.org/project/yoast_seo/issues/3535659 π SEO warning triggered when content is wrapped in Active ) where we can discuss this further and decide course of action.
Automatically closed - issue fixed for 2 weeks with no activity.