Created on 22 May 2010, almost 15 years ago
Updated 13 February 2025, 10 days ago

This material describes problem in general:
http://greenash.net.au/thoughts/2006/05/an-undo-button-for-drupal/

As far as I'm familiar with Drupal, there's no way one could possibly create this functionality using an external module. It must be implemented in core (somewhere in db_query() function ) so it must be a patch.

Being also a desktop/flash developer I'm familiar with techniques used to provide undo/redo subsystem to these kinds of platforms.
As most of you know widely used are Command objects:
http://en.wikipedia.org/wiki/Command_pattern

As for Drupal websites there's no simple method to implement this that way. However I'm certain it can be done in quite similar fashion:

Assumptions:

1. There's more that one Undo/Redo list ( one for each admin-role user )
2. RUL (Redo/Undo List) is NOT unlimited
3. It can be turned off easily

Definitions:

Let's call each undo-able operation (INSERT, DELETE, UPDATE) a .

Where to begin ?

For me there's perfect place called . Every nice query will go through it.

Procedure of creating RUL could be similar to this:

(in db_query call)

  1. Check if passed query is a Command
  2. Extract Command Object from the query
    1. Calculate query with db_query()
    2. Calculate query with similar
  3. Write the object for given user to the RUL table
  4. Execute Command-> query

Undo handling (if possible)

(in undo handler)

  1. Fetch the last saved Command Object for current user
  2. Execute unExecute() procedure
  3. Remove object from DB

Additional branching, redo and Commands removal will have to be made.

It can be tedious but definitely worth it.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

database system

Created by

πŸ‡΅πŸ‡±Poland GrzegorzNowak

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024