QUALITY PATCH

ACP2E-4698: Page Builder Text inline editing saves absolute media image URLs…

Page Builder Text inline editing saves absolute media image URLs after editing an image again, instead of keeping the portable media url=... directive. Quality patch ACP2E-4698 for magento/module-page-builder applies to Magento Open Source and Adobe Commerce 2.4.7-p8 to 2.4.8-p5.

Categories
Content
Components
magento/module-page-builder
Origin
adobe-commerce-support
Since QPT
1.1.82

Issue

Page Builder Text inline editing saves absolute media image URLs after editing an image again, instead of keeping the portable media url=... directive.

Steps to reproduce

1. On the Admin sidebar, go to Content > Elements > Pages and open a CMS page in edit mode. 1. Expand the Content section and edit a Text content type. 1. In the editor toolbar, click the Insert Image icon. 1. Select an image from the Media Gallery. 1. Save the CMS page. 1. Inspect the stored HTML for the edited page: The image src attribute uses a media url=... directive. This is the correct behavior. 1. Edit the same CMS page again. 1. In the Content section, edit the same Text content type. 1. Select the existing image in the inline editor and reopen the Insert/edit image dialog. 1. Change the image width or height under Dimensions, click Save, and then save the CMS page. 1. Inspect the stored HTML again: The image src attribute is replaced with a fully qualified Admin media URL, such as https://example.com/media/.renditions/wysiwyg/.../image.png. The media directive is lost, and the URL becomes static.

Adobe's page lists 2.4.7-p9 – 2.4.7-p10, 2.4.8-p4 – 2.4.8-p5 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.9.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACP2E-4698. On Cloud, add ACP2E-4698 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACP2E-4698/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-page-builder
Packages across compatible versions (1): magento/module-page-builder

magento/module-page-builder >=2.2.5-p8 <2.2.6 || >=2.2.6-p3 <2.2.7

Magento Open Source
2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.7-p10, 2.4.7-p9, 2.4.7-p8
Adobe Commerce
2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.7-p10, 2.4.7-p9, 2.4.7-p8
Patch file
patches/os/ACP2E-4705_2.2.5-p8.patch
  • vendor/magento/module-page-builder/view/adminhtml/web/js/utils/directives.js
  • vendor/magento/module-page-builder/view/adminhtml/web/js/wysiwyg/tinymce.js
  • vendor/magento/module-page-builder/view/adminhtml/web/ts/js/utils/directives.ts
  • vendor/magento/module-page-builder/view/adminhtml/web/ts/js/wysiwyg/tinymce.ts

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.