-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add last modified field value to sitemap when exists #7313
Add last modified field value to sitemap when exists #7313
Conversation
294a86c
to
44d8d5e
Compare
@@ -126,7 +126,7 @@ private function generateSitemapUrl( | |||
string $host, | |||
string $scheme | |||
) { | |||
$changed = $contentPage['changed']; | |||
$changed = $contentPage['lastModified'] ?? $contentPage['changed']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chirimoya is the new expected behaviour not returning the created instead of changed date of the node? Should we remove the fallback to changed? It is a little bit strange here now. As soon as once the lastModified is defined the changed is not longer automatically provided to the sitemap, is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed with @chirimoya to avoid a backwards compatibility break we will keep here the fallback to changed
like currently ipmlemented. We maybe will change this in future when it is maybe possible in the UI of the publishing to set update lastmodified timestamp
via a toggler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a test where the lastModified field is filled.
44d8d5e
to
a3bdd2b
Compare
a3bdd2b
to
619d259
Compare
What's in this PR?
Adding the last modified field to the sitemap if it's defined.
Why?
For better content in the sitemap.