Allow submission of entity delete and entity delete multiple forms inside a WS

Created on 16 February 2023, about 2 years ago
Updated 17 February 2023, about 2 years ago

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.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024