-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unpublishing the parent page does not include the children #88
Comments
Thanks, @ssmarco! Adding a note for when we implement a fix for this:
|
Issue [silverstripe#88](silverstripe#88) Uses `SiteTree::enforce_strict_hierarchy` config in adding child pages in getting the dependent documents for indexing
Issue [silverstripe#88](silverstripe#88) Uses `SiteTree::enforce_strict_hierarchy` config in getting the dependent documents for indexing child pages.
Issue [silverstripe#88](silverstripe#88) Uses `SiteTree::enforce_strict_hierarchy` config in getting the dependent documents for indexing child pages.
Issue [silverstripe#88](silverstripe#88) Uses `SiteTree::enforce_strict_hierarchy` config in getting the dependent documents for indexing child pages.
Can confirm that this is an issue - though probably one that should be fixed in framework or versioned instead. The problem is really that child pages which get unpublished don't get that extension hook called on them, which is most likely down to the convoluted way cascading publish/unpublish events end up getting performed. |
Thanks @GuySartorelli |
The content of the index should basically contain the same pages as a public user can see/navigate to, so we should keep them in sync. I guess during query time there's a canView check done for each result so we won't present unwanted content, but it'd be best if it even wasn't in the index in the first place. |
It depends which search implementation you're using. If you're using (say) the JS libraries supplied by Elastic, then your client side is communicating directly with your Elastic engine, so there's no We had a similar issue to this with the static publisher module (child pages not having their cache purged if the parent is unpublished). The solution there was to fetch and purge child pages as part of the un-publish that was actioned on the parent. Noting again that this only happens if |
Even if you do the search request from PHP and then perform a |
That's probably accurate, yeah. It'd probably be worth checking what sort of performance hit you'd be taking by calling the hook on each child, but I can't imagine it'd be too bad in most cases. |
* FIX Unpublising parent pages should include child pages fixes Issue [#88](#88) Uses `SiteTree::enforce_strict_hierarchy` config in getting the dependent documents for indexing child pages. * Bugfix `DataObjectDocument::getDependentDocuments` to get dependencies via `has_one` relationships --------- Co-authored-by: Bernard Hamlin <[email protected]>
fixed by #89 |
In the CMS, unpublishing the parent page also unpublishes the children automatically.
However, the same behaviour does not seem to sync when it comes to removing them from Elastic.
In this situation, the search results from Elastic will include the supposedly unpublished content. This looks like it affects version 2 and 3 but not tried on v1
Here are steps below to replicate this issue.
The text was updated successfully, but these errors were encountered: