This form can only be submitted in the default workspace

Created on 28 October 2022, about 2 years ago
Updated 18 April 2024, 7 months ago

Problem/Motivation

I can't save some content on my site, because related form can not be submitted on non-live workspace.

For example I use entity_embed module to make it possible to insert images into the node body. And I can't insert it now, because I'm getting an error after submission:

This form can only be submitted in the default workspace.

This issue is related to 2 forms: entity_browser_embed_image_form and entity_embed_dialog.

I have the same error with views_form_sort_*** forms.

And the same error for view previews (see the screenshot). Maybe this one is not critical, reporting it to provide more details on the issue.

Steps to reproduce

For entity embed:

  1. Install and enable the entity_embed module.
  2. Switch to Stage (or any other) workspace.
  3. Create a node, try to insert/embed an image to the node body.

For views sort pages:

  1. Create a view with Content: Weight Selector field to make it possible to sort items on the page (using drag and drop).
  2. Switch to Stage (or any other) workspace.
  3. Try to reorder the nodes on the page (of that view) and click Save.

Proposed resolution

Make it possible to configure the forms that can be treated as workspace safe.

For now I use hook_form_alter() to add $form_state->set('workspace_safe', TRUE); for the following forms:

  1. entity_browser_embed_image_form
  2. entity_embed_dialog
  3. ^views_form_sort_.+$
  4. and couple of my custom forms.
🐛 Bug report
Status

Closed: duplicate

Version

11.0 🔥

Component
Workspaces 

Last updated 6 days ago

No maintainer
Created by

🇷🇺Russia i-grou

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024