magento / magento2-page-builder

Magento2 PageBuilder
Other
81 stars 63 forks source link

magento/magento2-page-builder#842: Template Preview Images Incorrectly Saved to Media Directory #843

Closed bluemwhitew closed 5 days ago

bluemwhitew commented 1 year ago

Description (*)

This fixes an issue where Page Builder would save its preview images into the top-level media directory, as opposed to within its designated .template-manager subdirectory. It also contains some minor refactoring.

Story

N/A

Bug

N/A

Task

N/A

Fixed Issues

  1. magento/magento2-page-builder#842: Template Preview Images Incorrectly Saved to Media Directory

Builds

N/A

Related Pull Requests

N/A

Manual Testing Scenarios (*)

  1. Click on any Page Builder-enabled field (doesn't have to be empty)
  2. Click Save as Template
  3. Define a Template Name (such as "Example")
  4. Click Save
  5. Verify that "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) of the template you just saved
  8. Validate that the image was saved within the .template-manager directory
  1. Follow Steps 1-8 from the "Validate Saved to Directory" scenario
  2. Browse to Content » Templates
  3. Open the Preview Image in a new tab ("Open Image in New Tab")
  4. Click Delete
  5. Verify that you see, "Are you sure you want to permanently delete template Example" (where "Example" is your Template Name)
  6. Click OK
  7. Verify that you see, "Template successfully deleted."
  8. Reload the tab from Step 3 pointing to the Preview Image
  9. Validate that it now returns a 404

Questions or Comments

Other minor improvements that can be made here include:

Checklist

bluemwhitew commented 1 year ago

@magento run Integration Tests, Unit Tests

magento-automated-testing[bot] commented 1 year ago

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

bluemwhitew commented 1 year ago

@magento run all tests

magento-automated-testing[bot] commented 1 year ago

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

bluemwhitew commented 1 year ago

@magento run all tests

magento-automated-testing[bot] commented 1 year ago

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

bluemwhitew commented 1 year ago

@dhaecker,

Sorry to ping directly, are these test failures already known (not related to this PR)? 🙏🏻

dhaecker commented 1 year ago

@bluemwhitew Hi, long time no see!

Those failures are definitely not expected. Looking at the builds, branches being used, etc., I THINK the issue is that magento/magento2-page-builder/ is not synced with magento-commerce/magento2-page-builder/. Looks like the commits are 1 year behind so a LOT of stuff is missing (like php 8.2 compatibility & whatever else)... I'll ask around & see how this can be fixed

dhaecker commented 1 year ago

@magento run all tests

magento-automated-testing[bot] commented 1 year ago

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

dhaecker commented 1 year ago

@bluemwhitew i think i fixed the issue. magento/magento2-page-builder/develop was out of sync with magento-commerce/magento2-page-builder/develop. it is now in sync. however, you now need to merge in latest develop into your branch. once you do that, i THINK the builds should work

direct message me again if there are more problems (otherwise I might miss it)

engcom-Hotel commented 1 month ago

@magento run all tests

engcom-Hotel commented 1 month ago

@magento run Functional Tests B2B, Static Tests

engcom-Hotel commented 1 month ago

@magento run Functional Tests B2B, Static Tests

engcom-Hotel commented 4 weeks ago

@magento run all tests

engcom-Hotel commented 4 weeks ago

:heavy_check_mark: QA Passed

Preconditions: Enable PageBuilder

Manual testing scenario:

  1. Click on any Page Builder-enabled field (doesn't have to be empty)
  2. Click Save as Template
  3. Define a Template Name (such as "Example")
  4. Click Save
  5. Verify that "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) of the template you just saved
  8. Validate that the image was saved within the .template-manager directory

Before: :heavy_multiplication_x:

image image

Actual Result: :heavy_check_mark: Image(s) should stored under ~/pub/media/.template-manager/

After: :heavy_check_mark: image image

Tested all the manual scenarios, no impact on regression testing.

engcom-Hotel commented 4 weeks ago

@magento run Functional Tests B2B, Functional Tests EE, Functional Tests CE

engcom-Hotel commented 4 weeks ago

@magento run Functional Tests B2B

engcom-Hotel commented 4 weeks ago

@magento run Functional Tests B2B

engcom-Hotel commented 4 weeks ago

@magento run Functional Tests B2B

bluemwhitew commented 3 weeks ago

@magento run Functional Tests B2B

engcom-Hotel commented 3 weeks ago

@magento run Functional Tests B2B

engcom-Hotel commented 3 weeks ago

Moving the PR in Merge in progress

bluemwhitew commented 4 days ago

Thank you so much! 🙏🏻