Closed tkimnguyen closed 8 years ago
+1
+1
+1
Maybe put in a risks section talking about UX issues relating to how to explain why you can't undo something and/or explaining what objects can be changed by an undo
I would love an undo feature, but rolling tranactions back has some problems. For example In an active site, a user changes something and soon after that another user also changes something. Then the first users transaction cannot be rolled back without the second users transaction. So the undo must be disallowed for the first user, which can lead into frustration. It's even a bit dangerous for admins. But it would be great, if a good undo feature would become reality.
@thet I thought (and could be mistaken) that a non-Manager going to the undo_form saw only their own transactions, and could not undo anyone else's transactions. For admins, sometimes being able to undo, even if it affects others, is far better than not being able to undo.
Another risk you need to add to the list. Viewing the Undo form has this nasty habbit of locking the DB. Not just the currently mounted one either. For large DB's it can take a long time render and you end up with sites going down. This has happened to us before. This should probably be fixed before we make it visible in the site setup.
Any long running operation should be performed on a dedicated ZEO client. This is true of reindexing, etc.
The DB/transaction based Undo Form can be an addon, but this way of undo is not stable enough and has its glitches, so I dont want to have it in core.
@tkimnguyen If you plan to make this a real plip, please use the template http://issuetemplate.com/#/plone/Products.CMFPlone/PLIP and turn this into a real PLIP so the FWT can discuss it - otherwise please close the issue.
@jensens I don't mind creating a PLIP with that template, but I don't know what to put in the "How is this going to be implemented" field, since it seems you're opposed to re-enabling this and I'm getting the feeling @vangheem is opposed as well. Undo has been such a lifesaver to me and many others. It may not be perfect, but it sure is better than not having it. Maybe someone else has a better idea on how to restore the feature or re-implement it, but I'm not that person.
I saw @seanupton mentioning zc.beforestorage on a thread on community and it seems to me it must be handy to implement this feature.
@hvelarde I think beforestorage, plus some kind of current deletion log (just needs an event subscriber to write it), would be enough stored to have a user-facing (where user is Manager role, IMHO) interface to restore content as it was before deletion, provided it is still in the history stored (e.g. my pack keeps 7 days).
@tkimnguyen I suspect that relying on undo as it was before is a bit of a dead-end, especially on a site with just enough writes to be problematic if you want to roll-back a transaction.
I am happy to help PLIP and collaborate on implementing a means of doing this (my employer's customers need this anyway), provided others are interested in providing feedback on UX and security implications.
So I close this one - the framework team is happy to review an upcoming plip.
@seanupton could you please make that PLIP happen so we don't lose momentum?
@hvelarde sure, though I think I need to think/talk about scope a bit more first. Undelete is just a subset of undo, and my thinking with beforestorage is that we could support both undelete and "overwrite existing with previous copy" (on one or more items deleted or modified in a transaction).
@tkimnguyen any thoughts on scope?
@seanupton I think that's exactly the kind of discussion we must have in the scope of the PLIP; copy and paste that on the implementation and risk parts of it.
IMO, we can just start with the undelete feature as that be useful in probably more than 80% of the time.
@seanupton supporting delete is a great start and probably the main use case for regular users, though some of the "trash" functionality @vangheem has implemented elsewhere might address that better than undo.
The other use cases that I need are for changes to site configuration, like the activation or deactivation of an add-on that damages the site.
Since Plone 3 the undo_form portal_action has been made not visible and then removed entirely from Plone. Undo is an amazingly useful feature! It is a distinguishing feature of Plone as well. Yes it's not perfect but it was really really good.
This is a PLIP following from discussion in https://github.com/plone/Products.CMFPlone/issues/783
Here are some options