Project

General

Profile

Bug #93010

Updated by Daniel Siepmann almost 4 years ago

Steps to reproduce: 
 # Switch to a workspace 
 # Create a new page 
 # Enable page within workspace (remove hidden) 
 # Open the custom a 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 Both RecordsXmlSitemapDataProvider and PagesXmlSitemapDataProvider seem to be affected. 
 Entries Also in case of RecordsXmlSitemapDataProvider, entries are rendered twice when in workspace preview. Didn't try PagesXmlSitemapDataProvider. But 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: 
 <pre> 
 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 
                     } 
                 } 
             } 
         } 
     } 
 } 
 </pre> (Adjust pid to your needs) 
 And template: 
 <pre> 
 <?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> 
 </pre> 

 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.

Back