Skip to content
  • Christian Kuhn's avatar
    [TASK] Make workspace delete a discard · 5e7cad94
    Christian Kuhn authored and Anja Leichsenring's avatar Anja Leichsenring committed
    When deleting a record in workspaces that has been
    changed in comparison to live - if it is a new, a moved
    or a changed workspace record, those records where subject
    to the 'soft-delete' strategy of the core: Soft-delete
    enabled tables like pages or tt_content did set deleted=1
    for those records instead of fully deleting them from the
    table. The idea was to allow 'undelete' via recycler or
    history module if those records have been deleted by
    accident.
    
    However, the undelete workspace records functionality
    never worked and has never been fixed. The oldest open
    forge issue on this topic is 11 (!) years old.
    
    The solution is to discard those records instead of
    soft-deleting them. This effectively drops soft-delete
    for workspace records. It's done by a trivial switch in
    the main DataHandler delete method to re-route workspace
    delete operation to the recently refactored discard
    methods instead.
    
    This change allows us to further refactor the remaining
    tasks the DataHandler delete functionality is concerned
    with, since delete still handles three things:
    * Deleting and soft-deleting records in live.
    * Creating 'delete placeholder' records in workspaces.
      This is the 'mark the record as to-be-deleted in live
      on workspace publish' operation.
    * Undeleting records using recycler and partially the
      history module.
    
    Dropping the workspace-delete scenarios reduces complexity
    significantly. The codebase can now be changed with upcoming
    patches to separate remaining concerns - similar to what has
    been done with discard already. The according scenarios will
    see improved test coverage and far better understandable
    code along the way. This will ultimately allow us to
    fix remaining bugs in this area on one hand and to
    improve user experience on the other hand.
    
    Change-Id: I33e1258cb6205668511933c0d9b225f4470655e7
    Resolves: #93121
    Resolves: #21299
    Resolves: #89383
    Releases: master
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67191
    
    
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: default avatarBenni Mack <benni@typo3.org>
    Tested-by: default avatarOliver Bartsch <bo@cedev.de>
    Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    Reviewed-by: default avatarBenni Mack <benni@typo3.org>
    Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
    Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    5e7cad94