Problem/Motivation

When using the Footnotes plugin in CKEditor within a Workspace, clicking the Submit button in the modal dialog briefly displays the throbber, but does not close the dialog. Clicking the “X” at the top right of the dialog closes the dialog, but then all of the CKEditor instances on the page disappear and are replaced by plain textareas containing HTML markup.

Environment

This problem was observed under both Drupal 11.2 and 11.3 in multiple browsers.

Steps to reproduce

  1. Enable Footnotes, Workspaces, Workspaces UI modules.
  2. Configure a text format for CKEditor, place the Footnotes button in the toolbar, and enable Footnotes filtering.
  3. Configure a content-type to use that text format.
  4. Create a new Workspace and switch to it.
  5. Create a new node of that content-type, and attempt to add a footnote.
  6. Observe the behavior described in the Problem/Motivation section above.

Proposed resolution

Mark the form as workspaces-safe

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#6 image (1).jpeg35.19 KBrduterte
#6 image.jpeg10.47 KBrduterte

Issue fork footnotes-3570015

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

daniel_j created an issue. See original summary.

daniel_j’s picture

Issue summary: View changes
Status: Active » Needs review
scott_euser’s picture

Thanks! I don't use workspaces myself often so will wait for someone else to test and confirm.

What I haven't dug into is what exactly workspace safe means. I can see this touches on it: https://www.drupal.org/project/drupal/issues/3208390

daniel_j’s picture

“Workspace safe” simply means that the form does one or the other of the following:

  • Affects no content entities that are staged in a workspace, OR
  • Affects only the workspace-staged version of a content entity.

Any form that is not explicitly marked as workspace-safe will be flagged with an error if it is submitted within a [non-Live] workspace. The Workspaces module itself has a list of core-provided forms that it marks safe in a hook_form_alter() implementation.

rduterte’s picture

StatusFileSize
new10.47 KB
new35.19 KB

Hi All,

I have confirmed and reproduce the issue.
Drupal core version: 11.3
This is my actual steps:

  • Install footnotes 4.0@dev.
  • Enable this modules: footnotes workspaces workspaces_ui
  • Configure Text Format via: /admin/config/content/formats
  • Edit "Full HTML"
  • Add Footnotes button to CKEditor 5 toolbar
  • Enable Footnotes filter
  • Create a workspace via: /admin/config/workflow/workspaces and switch to that workspace
  • Create Content -> Basic Page -> Use Full HTML
  • Click Footnotes button
  • Submit in modal

All the components in the toolbar are being removed.
See attached: No Toolbar

After applying the fix the footnotes modal works as expected.
See attached: After fix

Happy for this to go through, Thanks!!

rduterte’s picture

Status: Needs review » Reviewed & tested by the community
scott_euser’s picture

Status: Reviewed & tested by the community » Fixed

Added to merge train. Thanks again! (Also @rduterte thank you for taking the time to thoroughly review, much appreciated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

scott_euser’s picture

Status: Fixed » Reviewed & tested by the community

Test failure, seems random; re-running

scott_euser’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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