magento2-page-builder
magento2-page-builder copied to clipboard
Broken CMS block preview when using identifier in pagebuilder
Description (*)
When adding a CMS block in a CMS page using the block identifier instead of the block ID, pagebuilder displays following error : "Block with ID: [block identifier] doesn't exist." instead of showing preview of the CMS block.
The block renders properly on front-end. There is no way to add a block with his identifier directly from pagebuilder. This issue would only happen if a developer executes a data patch that generates CMS content or directly edit the content in the database.
Bug
- <2838> Broken CMS block preview when using identifier in pagebuilder
Fixed Issues (if relevant)
- magento/magento2#35070: Broken CMS block preview when using identifier in pagebuilder
Manual testing scenarios (*)
- Create a CMS Block with any content
- Create a CMS Page and add previously created CMS Block in the page with the PageBuilder Block component
- Open cms_page table
- Find the created page
- Replace block_id value with the block identifier in the content cell. Example for a block with identifier contact-us-banner :
-
{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="contact-us-banner" type_name="CMS Static Block"}}
- Apply changes
- Refresh pagebuilder page to see error
Checklist
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [ ] All automated tests passed successfully (all builds are green)
@magento run all test
Failed to run the builds. Please try to re-run them later.
@magento run all tests
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.