Use the Person piece only for publishers. #20827
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Person
schema piece is wrongly generated on authors archive pages ( so whenindexable type = 'user'
) and the site was previously setup to represent a Person different than the author. We want to avoid this.Summary
This PR can be summarized in the following changelog entry:
Organization, Person
schema piece would be wrongly generated for author pages when a website representing an organization was set to represent a person different than the author.Relevant technical choices:
is_needed
method of thePerson
schema piece generator has been updated to not take into account the case in whichindexable_type = 'user'
. This is because this piece, being of typeOrganization, Person
is meant to represent the website publisher in case the website represents a person. Giving the fact we create a'user'
indexable only for authors, the case is covered by theAuthor
schema piece generator.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Without this PR - reproduce the bug
Yoast SEO
->General
First-time configuration
tabSite representation
choose the website to represent a person and choose an authorSite representation
step and change the website to represent an organizationOrganization, Person
representing the previously selected authorWith this PR
Organization, Person
representing the previously selected author is not generated anymoreRelevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.Fixes #20601