Sheet 1
de-activation &
deletion
  analysis by info.nl
    don't delete node if de-activation fails
      MAGNOLIA-3250
    show comment dialog
    don't show current warning about de-activation on deletion
    keep the node so that the inbox works
  concept
    delete
      version (for restore)
        how to treat sub pages
          version them too?
      mark page as deleted
        node type?
          can't change the node type
          have to keep the uuid
            for the version dialog
        flag?
          mixin
            mgnl:deleted
          can we show icon based on the flag?
            test it
          assign special template
            show original page
            restore
            renders some information
            not available
      purge content
        keep su-pages stubs
    physical delete
      when marked / red status
      either never activated or gone through activation
    restore
      in version list dialog
      link the template
        recursive restore
    de-activation
      workflow
        the same
          need a parameter to decided which command we execute
      not available for deleted pages!
      only for existing pages which should get unpublished
    activation
      no changes
      means: we also version the marked page
    final commands
      perform de-activation operation if this is a marked page
        works on older version
        delegate command
      activate the deletion of the subpages
      change the receiver?
        no
      physically delete if it was marked
    templates/navigation
      use a wrapper which hides this nodes
    inbox
      how to distinguish activation/de-activatoin
        workflow name only?
      preview for deleted pages?
        link to the last version?
        use the special delete template?
      icon for deleted pages
    tree
      icon for deleted pages
      de-activation
        show a comment dialog
    UI (A)
      rename activate to activate changes
      delete: recursive activation is not available
      don't show subpages
      delete: not allowed to move/copy, ....
  steps
    delete
      tree
        change delete
        icon
      create the deleted page template
      change activation
      inbox
      special wrapper
    de-activation workflow
      workflow
      inbox
      dialog
Background
When using workflow to make a distinction between “editors” and “publishers”, then the flows ‘deactivation’ and ‘deletion’ also need a workflow.
Assumptions
If we understand correctly, then Magnolia 4.3.2 currently works as follows:
1- Activation, deactivation and deletion (which itself includes a step to deactivate the content first) all use the current user’s credentials.
2- If the credentials are unknown on the public instance(s), or outdated, or if deactivation fails otherwise, then the “delete” command still removes the content from the authoring instance. To fix that, a user needs to log in to the public instance(s), and delete the content directly. (MAGNOLIA-3250)
3- The Observation module could be used to ensure that the user credentials are always synchronized.
4- When content is deleted, the version history is deleted as well .
5- Deletion cannot be disallowed for specific user roles. It cannot be removed from the context menu (right-click menu) either.
6- The workflow module only supports activation out of the box.
7- When using workflow, content is activated using the credentials of superuser.
8- A deactivation workflow can be configured. But when not changing some JavaScript for the AdminCentral as well, such deactivation workflow will not prompt the user for a comment (nor for an optional deactivation date), like the activation workflow does.
9- As deactivation is part of the normal steps for deletion, such deactivation workflow is also executed when firing a “delete” command. However, the “delete” command is oblivious about that workflow for the deactivation step, and does not await the result of that workflow. Hence, immediately after the deactivation workflow is started, the content is removed from the authoring instance (even before a publisher has taken a look at the work item). So, when creating a deactivation workflow then one must also ensure that the normal “delete” is handled differently.
10- When configuring a workflow for deletion, the standard message “Delete node? The node … will be DE-ACTIVATED and deleted immediately. Are you sure to continue?” is still shown.
11- A deletion workflow cannot be configured without changing some Magnolia source code. Trying to create a workflow without such changes results in work items that operate on the parent of the selected node. (Hence, when using the default Magnolia classes, proceeding such workflow would result in deletion of the parent node, and all its children, rather than only the child on which the delete command was fired.)
Question/ Remarks
- Are the assumptions correct?
- Regarding point 5: To disable the delete option in the “website” screen, one could define a dummy workflow that simply displays an alert saying that only “deactivation” is supported. But to actually delete nodes a publisher would then need access to the JCR Browser. (and deletion would still first show the default warning.)
- Regarding point 8 => So the JavaScript for AdminCentral has to be patched . This will make upgrading Magnolia in the near future more time consuming and expensive.
- Regarding point 9 => Also this ‘problem’ has to be patched. This will make upgrading Magnolia in the near future more time consuming and expensive.
- Regarding pint 11 => When creating some custom Java class to DELETE the correct node, upgrading Magnolia might be an issue too. Patching the Inbox to SHOW the correct node surely makes upgrading difficult.
We are surprised that we encountered the problems mentioned above when configuring the deactivation and delete workflow (especially in the Enterprise edition). To prevent that we have to do the same code adjustments (as mentioned above) we would like to know how we can configure the deactivation and delete workflow without altering the source code?
Till now Zdenek Skodik has helped us trying to solve some issues that all relate to workflow and deletion of content:
http://jira.magnolia-cms.com/browse/MAGNOLIA-3250
http://jira.magnolia-cms.com/browse/SUPPORT-661
http://jira.magnolia-cms.com/browse/SUPPORT-669
Thanks!!
Kind regards,
Hans Vingerhoeds