Skip to content

Block preview in page builder broken for blocks that do not belong in the default strore. #36383

Open
@TheBadong

Description

@TheBadong

Preconditions and environment

Magento ver. 2.4.3-p2

Steps to reproduce

  1. Have a magento instance with at least two stores
  2. Create a cms block only visible in the store that is not the default store
  3. Create a cms page in on of the two stores (doesn't matter which one)
  4. Add the cms block you created, in the page through the page builder.

Expected result

Block preview should render

Actual result

No block preview is rendered
Screenshot 2022-10-28 at 12 57 05

Additional information

From my research, i found that the code goes through this file vendor/magento/module-cms/Block/Widget/Block.php(131) and gets sets the default store id on the block it's trying to fetch. It then tries to look for the block from the other store with the wrong store id, and does not find it here vendor/magento/module-cms/Model/ResourceModel/Block.php(121). The block is not loaded and the preview is blank.

Note that only the preview in the page builder is broken, the page renders correctly on the frontend.

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”.

Metadata

Metadata

Assignees

Labels

Area: ContentComponent: CmsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: dev in progressReported on 2.4.3-p2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Dev In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions