aem-design / aemdesign-aem-core

An implementation of AEM.Design component concepts
http://aem.design
Apache License 2.0
18 stars 12 forks source link

pagelist component doesn't respect unpublished content #23

Open leachuk opened 4 years ago

leachuk commented 4 years ago

Bug Report

Current Behavior When the pagelist component is set to list Child Pages and unpublishing one of the child nodes, it is still displayed on the author instance while correctly being removed from the publish instance list.

Expected behavior/code The list on the author instance should not display the unpublished node so it provides an accurate and consistent authoring experience.

Environment

Possible Solution Code fix required.

Additional context / Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

wildone commented 4 years ago

so does this mean that on the Author pages that are unpublished should be hidden, similar behaviour to Hide in Navigation?

wildone commented 4 years ago

to do this the rule should be added as a filter for list collection that hides all pages that have cq:lastReplicationAction = Deactivated

wildone commented 4 years ago

this function can be updated to include this rule

static boolean includePageInList(Page page, boolean includeInvalid, boolean includeHidden) { return (includeHidden || !page.isHideInNav()) && (includeInvalid || page.isValid()) && page.getDeleted() == null; }

wildone commented 4 years ago

Also this is more a feature than a bug...

wildone commented 4 years ago

As an alternative I would recommend adding a flag for this to show to authors stuff that is in the CMS but has been unpublished this would provide some input in to figuring out why some content not appearing.