Problem/Motivation
It appears that when you have already existing live/indexed/published content, and you are using Content Moderation to create a new, unpublished revision of that content, that XML sitemap is using that latest version for indexing, and so it's saving the link in the table as unaccessible (since drafts are not published to anonymous users generally).
Proposed resolution
We need to check our entity indexing code to see if the current entity object is considered the current/live revision, and if not, skip indexing.
User interface changes
None
API changes
None
Data model changes
None
Issue fork xmlsitemap-3252329
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dave reidI tested the update hook on two different sites, one that had about 20 items that needed to be corrected, and it worked as expected. My hope is that this impact is minimal on larger sites.
Comment #5
dave reid