Media library form can only be submitted in the default workspace

Created on 5 June 2020, over 4 years ago
Updated 25 October 2024, 27 days ago

Make media library form to be workspace safe. Currently while in a workspace it isn't possible to create new media entities, which hampers the usefulness and usability of using a workspace.

Steps to reproduce

  • Using a fresh Drupal 9.2 Umami install, enable the Workspaces module and create a workspace.
  • Switch to the new workspace
  • Create or edit a recipe. For the main image field, open the media library and attempt to upload an image to create a new entity
  • Alternatively, try to create a new image media directly in the media library

Either way you should see the error "This form can only be submitted in the default workspace." and the media entity is not created. Switching back to the live workspace, creating a new image media entity by either method works fine.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component

media system

Created by

πŸ‡§πŸ‡·Brazil DarKFlameS

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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 adamzimmermann

    Assumption: Most Drupal sites are uploading files using media entities, and media entities throw the error noted above when trying to edit them in the non-default workspace. This makes the workspaces module unusable (with media entities) as someone trying to implement it on a new site build right now.

    I don't see any recent activity on this issue and the last patch seems to have issues from what others are reporting.

    Is the workspaces module simply not being used on production sites yet, or how are others getting around this?

    Do we need to alter media entities like they have done for files in πŸ› Cannot create entity with image in a workspace Fixed ? Are there known side-effects to this that make this not a viable solution?

    Any insight is much appreciated!

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

    For anyone else having this issue, the Workspaces Extra module β†’ seems to help solve this and many other issues. It feels weird to need a contrib module for core functionality to work though.

Production build 0.71.5 2024