magento2
magento2 copied to clipboard
CORS Errors Prevent Page Builder Content Updates in Magento 2.4.6-p7 (Production Mode)
Preconditions and environment
Environment:
- Magento Version: 2.4.6-p7
- Web Server: Nginx
- PHP Version: 8.2
- Page Builder extension enabled.
- Store Mode: Production (issue occurs only in this mode).
Quality Patches:
- The issue persists even after applying quality patches ACSD-49628 and ACSD-59514.
Steps to reproduce
- Log in to the Magento 2 Admin panel.
- Navigate to Content > Pages.
- Click on Add New Page or select an existing CMS page and click Edit.
- Use the Page Builder to add a new content block or edit an existing block.
- Make any changes to the content (e.g., adding text, images, or other elements).
- Click the Save button to update the page.
Expected result
- The page content should be saved successfully without any errors.
Actual result
- The Page Builder changes fail to save.
- The browser console logs CORS-related errors, specifically showing:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://domain.com/static/adminhtml/Magento/backend/en_US/requirejs/require.js. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.
Additional information
Note: This problem occurs only in production mode, the Page Builder works fine in developer mode.
We have attempted the following workarounds without success:
- We have applied quality patches ACSD-49628 and ACSD-59514, and we deployed the production environment .but the issue persists.
- Adding CORS headers to Nginx configuration.
- Clearing caches (both browser and Magento).
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”.