Skip to content

Page Builder breaks page when content with Emoji is saved #39750

Open
@ganeddact

Description

@ganeddact

Preconditions and environment

  • Magento version: 2.4.7-p4
  • Database collation is utf8_mb4_general_ci
  • Just add a new page or save an existing one, by adding an emoji

Steps to reproduce

  1. Add a new page or edit an existing one, using Page Builder
  2. Make the page with several rows
  3. add/paste the emoji in a text content, be sure it is not in the last element row (to see the effects to the rest of the page after save)
  4. save

Expected result

Page saves correctly, and works again when reopen for edit

Actual result

  • From the emoji onwards, the page gets entirely cut (check database value, page is cut exactly where the emoji should be and the rest of the page is missing).
  • JS error showing "TypeError: Cannot read properties of null (reading 'setAttribute')"
  • Page Builder stops working, making the page not editable anymore
  • if I wrap line 51-53 of vendor/magento/module-page-builder/view/adminhtml/web/js/stage-builder.js with a check if(element !== null), at least I'm able to salvage the rest of the page, but all that was after the emoji is lost

Additional information

No response

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”.

Metadata

Metadata

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.7-p4Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions