Bug #93010
closedEXT:seo sitemap includes none published pages from workspaces
100%
Description
- Switch to a workspace
- Create a new page
- Enable page within workspace (remove hidden)
- Open the custom sitemap in incognito mode (to prevent Workspace preview)
- You should see the new page.
Expected 5. step:
You should not see the new page, as it only should exist within the workspace.
The RecordsXmlSitemapDataProvider seem to be affected.
Entries are rendered twice when in workspace preview. I guess that's caused by the underlying issue and will be fixed all together.
I already tried to figure out what happens, but have not enough knowledge. But I think the page is created twice, once within the workspace, and once outsite. So EXT:seo needs to add some more checks?
PagesXmlSitemapDataProvider is not affected, as it uses $cObj->getTreeList to determine page uids, which already respects workspaces.
The corresponding TypoScript:
plugin.tx_seo { config { xmlSitemap { sitemaps { rssFeedAllBlogPosts { provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider config { table = pages sortField = lastUpdated lastModifiedField = tstamp additionalWhere = {$plugin.tx_seo.settings.xmlSitemap.sitemaps.pages.additionalWhere} pid = 3 recursive = 1 template = RssFeed } } } } } }(Adjust pid to your needs)
And template:
<?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Daniel Siepmann - Coding is Art</title> <description>List of blog posts at daniel-siepmann.de</description> <link>{f:uri.page(pageUid: 1, absolute: 1)}</link> <atom:link href="{f:uri.page(pageUid: 1. pageType: 1533906435, additionalParams: {sitemap: 'rssFeedAllBlogPosts'}, absolute: 1)}" rel="self" type="application/rss+xml" /> <lastBuildDate>{f:format.date(date: 'now', format: 'D, d M Y H:i:s O')}</lastBuildDate> <ttl>1800</ttl> <f:for each="{items}" as="item"> <f:if condition="{item.data.doktype} < 200"> {f:render(section: 'Item', arguments: { item: item.data })} </f:if> </f:for> </channel> </rss> <f:section name="Item"> <item> <title>{item.title}</title> <description>{item.abstract}</description> <link>{f:uri.page(pageUid: item.uid, absolute: 1)}</link> <pubDate>{f:format.date(date: item.lastUpdated, format: 'D, d M Y H:i:s O')}</pubDate> <guid isPermaLink="true">{f:uri.page(pageUid: item.uid, absolute: 1)}</guid> </item> </f:section>
I know the feature is not intended for RSS Feeds. I didn't try with other record types beside pages.
I guess I'll create my own provider for RSS Feed, in case someone else also got the same issues, we might think about fixing this issue.
Updated by Richard Haeser almost 4 years ago
I quickly tried to reproduce it, but was not able to do so. Will check again later.
Updated by Daniel Siepmann almost 4 years ago
- Description updated (diff)
Sorry, try to activate page within workspace after step 2. Missed that. I've updated the steps.
Updated by Daniel Siepmann almost 4 years ago
- Assignee changed from Richard Haeser to Daniel Siepmann
I can't reproduce the issue with master or 10.4.10 checked out from git.
Maybe this is related to my website setup. Not sure where to look though, as I've not touched the sitemap TypoScript. Only big difference is sqlite vs. mysql.
I'll check again when I've time.
Updated by Daniel Siepmann almost 4 years ago
- Description updated (diff)
- Assignee changed from Daniel Siepmann to Richard Haeser
Updated by Richard Haeser almost 4 years ago
Reply from Daniel on Slack (https://typo3.slack.com/archives/CABR20WRK/p1607413080020900?thread_ts=1607332108.014400&cid=CABR20WRK):
After some more time, I found out only the record provider is affected. I think we don't need to fix that right now. You mentioned my use case is not covered at all, so I miss use a feature of TYPO3 anyway.
Not sure if "normal use cases" are also affected as I don't really know how they look. I've adjusted the issue description to reflect my new findings.
Updated by Gerrit Code Review almost 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67392
Updated by Gerrit Code Review almost 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67392
Updated by Gerrit Code Review almost 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67392
Updated by Gerrit Code Review almost 4 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67392
Updated by Gerrit Code Review almost 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67412
Updated by Richard Haeser almost 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 37b7a893359f060c17261afdfa6f4bdcec571087.