Problem/Motivation

It's currently not possible to delete for example a media entity created inside a workspace from within that same workspace via the view bulk form on /admin/content/media . The reason is that DeleteMultipleForm and the ContentEntityDeleteForm are not workspace safe as of now.

Steps to reproduce

On Vanilla Drupal 9.5.x

  1. Enable wse and the media module
  2. Create a workspace and switch to it
  3. At /admin/content/media create a media entity of type image
  4. Still inside the workspace, delete the created media via the bulk operations form

Expected result: The media can be deleted
Actual result: The views bulk form on /admin/content/media and the confirm form, which the former one leads to after submission, both can't be submitted because they're not workspace safe.

Proposed resolution

Mark the form as workspace safe by swapping the bulk_form views plugin's class to override the BulkForm::viewsForm() method.

Issue fork wse-3342291

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

s_leu created an issue. See original summary.

s_leu’s picture

Issue summary: View changes
Status: Active » Needs review

amateescu made their first commit to this issue’s fork.

  • amateescu committed 9c0c1d35 on 1.0.x authored by s_leu
    Issue #3342291: Extended BulkForm views plugin class to mark entity bulk...
amateescu’s picture

Status: Needs review » Fixed

Merged into 1.0.x, thanks!

s_leu’s picture

Status: Fixed » Needs review

Have to re-open this for a small followup. The DeleteMultipleForm needs to be marked as workspace safe to prevent the submit in live dialog to popup there, as we explicitly want it to be possible to submit this form inside a workspace to delete content that is edited only in this content or its ancestors.

  • s_leu committed 8386599c on 1.0.x
    Issue #3342291: Mark DeleteMultipleForm as workspace safe
    
amateescu’s picture

Status: Needs review » Fixed

Merged the followup too, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.