micmania1 / silverstripe-lumberjack

Keep in control of large SiteTree's by using GridField to manage pages.
BSD 2-Clause "Simplified" License
13 stars 45 forks source link

Child pages that are deleted from draft disappear from gridfield #18

Open dhensby opened 9 years ago

dhensby commented 9 years ago

Pages that are live but have been deleted from Draft stage go missing from the gridfield

cc @tractorcow

tractorcow commented 9 years ago

That's a valid point, but in a future version of framework we are looking to remove the "delete from draft but not live" function as it's not intuitive.

In order to solve this problem it may be necessary to add a new search filter feature, something similar to the current sitetree filtering mechanism.

If other people would like this please raise your voices here and help get it prioritised. ;)

dhensby commented 9 years ago

AM I SHOUTING LOUD ENOUGH?!

stevie-mayhew commented 9 years ago

I will raise my voice also - this would be super handy for catalog manager.

christopherdarling commented 9 years ago

We've run into this too where a client had deleted a page from the draft site but left it published, they were unable to find the page in the CMS to remove it from the published site when they were ready. I've been working on a bit of a proof of concept, using the same code as CMSMain::treeview/listview to generate the list (AllChildrenIncludingDeleted) and using the same logic from SiteTree::getStatusFlags.

The code needs some tidying up (actually use SiteTree::getStatusFlags() - I've just copied and pasted it in to GridFieldSiteTreeState for now, and also the icons need some work.

I wanted to get some feedback on this before I polish it off and create a pull request.

https://github.com/christopherdarling/silverstripe-lumberjack/tree/1.1

dhensby commented 9 years ago

@christopherdarling Your solution looks similar to mine: https://github.com/silverstripe/silverstripe-lumberjack/issues/6

In that it just returns all pages deleted or not. The feedback has been that it's not a great solution.

Instead we probably need to create our own gridfield component for switching between showing deleted or not.

In 3.2 this will be less of a problem due to the archive feature...

christopherdarling commented 9 years ago

@dhensby I thought that the main issue with yours was that it listed all pages that were deleted/archived from both stages. Or have I got the wrong impression? With what I've used if the page is removed from both stages it's not present in the GridField.

I agree that creating a component and filtering is a better solution and probably the way to go, but I wonder if this could be a temporary solution to the problem/bug until that work on the component is done.

dhensby commented 9 years ago

@christopherdarling oh, interesting, well, open a PR and lets get some thoughts going :)

christopherdarling commented 9 years ago

@dhensby done :)