Blocks don't display in node preview mode

Created on 11 October 2024, 11 months ago

Problem/Motivation

Blocks added to a content context that triggers on content type are not displayed when an editor clicks on the preview button while editing a node.

Steps to reproduce

1. Create a view block
2. Add that view block to a context, then limit that context to your content type.
3. Create a new node, hit the preview button. The block will not display.
4. View the published node, the block will display.

For the time being, we removed the block from context, instead adding the block using the normal core block placement interface. In the normal block interface, we limited the visibility to the content type. In this case the block DOES display in both the node and on the preview page.

My expectation would be that blocks loaded via context would act the same way.

💬 Support request
Status

Active

Version

5.0

Component

Code

Created by

🇺🇸United States ed2908

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ed2908
  • 🇺🇸United States ed2908
  • 🇸🇮Slovenia deaom

    I could not reproduce the issue. My steps:

    1. Create a new view block -> content that displays nodes (list view)
    2. Create context -> add reaction blocks -> place the created view block in content region
    3. Add condition -> content type and limit it to display only for articles
    4. Add new content type article, enter title, click preview - > the block is visible.
    5. Add new content type basic page, enter title, click preview -> the block is not visible (as expected).

    Can you confirm if the issue is still present?

Production build 0.71.5 2024