magento2-page-builder icon indicating copy to clipboard operation
magento2-page-builder copied to clipboard

Template Preview Images Incorrectly Saved to Media Directory

Open bluemwhitew opened this issue 2 years ago • 2 comments

Preconditions (*)

  1. Adobe Commerce 2.4.4 (or greater)
  2. Page Builder 2.2.2 (or greater)
  3. bin/magento config:set cms/pagebuilder/enabled 1

Steps to Reproduce (*)

  1. Click on any Page Builder-enabled field (doesn't have to be empty)
  2. Click Save as Template
  3. Define a Template Name ("Example" in my case)
  4. Click Save
  5. Verify that you see, "The current contents of Page Builder has been successfully saved as a template."
  6. Click Apply Template
  7. Inspect the Preview Image path (can be full-size or thumbnail) from the template you just saved

Expected Result (*)

  1. Image(s) are stored under ~/pub/media/.template-manager/
    • https://app.magento2.test/pub/media/.template-manager/example63da278ce04a0-thumb.jpg

Actual Result (*)

  1. Image(s) are stored under ~/pub/media/ but contain .template-manager in the name, implying missing DS
    • https://app.magento2.test/pub/media/.template-managerexample63da278ce04a0-thumb.jpg

Notes

  • Directory is defined in: https://www.github.com/magento/magento2-page-builder/blob/develop/app/code/Magento/PageBuilder/etc/config.xml#L37
  • This appears to be an issue with Magento\PageBuilder\Controller\Adminhtml\Template\Save::storePreviewImage

Big thanks to @karlasa and other @vaimo team members who quickly helped me to validate this on various platforms, configurations, etc. 🙏🏻

bluemwhitew avatar Feb 01 '23 20:02 bluemwhitew

Hi @bluemwhitew. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Feb 01 '23 20:02 m2-assistant[bot]

@magento I am working on this

bluemwhitew avatar Feb 01 '23 22:02 bluemwhitew