Skip to content
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

pagelist component doesn't respect unpublished content #23

Open
leachuk opened this issue Feb 13, 2020 · 5 comments
Open

pagelist component doesn't respect unpublished content #23

leachuk opened this issue Feb 13, 2020 · 5 comments

Comments

@leachuk
Copy link
Contributor

leachuk commented Feb 13, 2020

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

  • AEM version and patch level (e.g. AEM 6.3 SP1 CFP2)
  • Core Components version (e.g. 2.0.4)
  • JRE version (e.g. Java(TM) SE Runtime Environment (build 1.8.0_152-b16))

Possible Solution
Code fix required.

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

@wildone
Copy link
Member

wildone commented Feb 14, 2020

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

@wildone
Copy link
Member

wildone commented Feb 14, 2020

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

@wildone
Copy link
Member

wildone commented Feb 14, 2020

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
Copy link
Member

wildone commented Feb 14, 2020

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

@wildone
Copy link
Member

wildone commented Mar 29, 2020

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.

cshawaus added a commit that referenced this issue Apr 16, 2020
* Update project url
* Add new feature to hide deactivated pages from display in list #23
* Add missing attributes
* Add explicit src output
* Add extra closing tags to ensure responsive grid does not break component
* Remove decoration for container in content block

Co-authored-by: wildone <[email protected]>
Co-authored-by: Chris Shaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants