RWS / dxa-content-management

SDL Digital Experience Accelerator CM-side framework (.NET Template Building Blocks)
Apache License 2.0
6 stars 18 forks source link

Sitemap can contain non-published pages #29

Closed willprice76 closed 5 years ago

willprice76 commented 5 years ago

If you have pages which are shared across sites, or publications within a single site, as soon as the page is published in one publication, it will appear in the sitemap of all publications where it is shared. This is due to a bug in the templating logic (GenerateSitemap TBB):

https://github.com/sdl/dxa-content-management/blob/da4925df268846b16bb29d431383e8728743633e/Sdl.Web.Tridion.Templates/Templates/GenerateSitemap.cs#L254

The call in the IsPublished method to PublishEngine.IsPublished omits the optional third parameter (bool isPublishedInContext) which means that it returns true whenever the page is published from any publication, rather than just the context publication

rpannekoek commented 5 years ago

Internal Issue ID (for tracking purposes): CRQ-12798

rpannekoek commented 5 years ago

Fixed in DXA 2.2