#38711·magento2

Widget not inserting or saving when the word 'type' is used anywhere in the text after a quotation mark

Author: ghostCreated May 10, 2024Updated Sep 17, 2026
LabelsIssue: ConfirmedComponent: TinymceTriage: Dev.ExperienceReproduced on 2.4.xProgress: ready for devPriority: P2Area: FrameworkReported on 2.4.6-p5

Summary

Hi. For a little context, we have recently made the decision to disable page builder and move towards a component-driven content entry approach utilising widgets. We have a "Generic Text" widget, which consists of a custom WYSIWYG parameter.

Whilst testing this widget, we came across a rather odd (and probably quite specific) problem, which is that if a quotation mark is present in the text, and then the word type is present anywhere in the text following it, the widget fails to insert or save and completely disappears from the editor.

Obviously we have some custom functionality going on here, but what I have observed is that this is also an issue with the standard Magento widgets where a text field is present. e.g. CMS Page Link, Catalog Product Link. Which leads me to believe this might not be related or our setup alone.

Environment

  • Magento version: 2.4.6-p5
  • Theme: Custom theme as a child of Hyva Default

Errors

  • No errors available in any of the standard logs.
  • No console errors available.

Examples

Steps to reproduce

Ensure Page Builder is disabled, and you're using the standard TinyMCE editor.

  1. Create, or edit an existing, page
  2. Click insert widget button/icon
  3. Choose CMS Page Link
  4. Enter " type into 'Anchor Custom Text'
  5. Insert the widget

You should find that the widget modal retracts, and you're left with:

  • If you created a new page, a blank editor
  • If you edited a page, the inserted widget won't be present

The same happens when trying to save a widget which existing content:

  1. Insert a new widget (without " type and save it), or edit an existing widget
  2. Edit the content of a text field so that " type is now included
  3. Save the widget

Proposed solution

The widget should insert/save as normal.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.