Problem/Motivation

When a Views block display is rendered by Display Builder (via the display_builder display extender provided by the display_builder_views submodule), the core Views block setting "Hide block if the view output is empty" (block_hide_empty) stops working: the block is still rendered even when the view has no results.

Steps to reproduce

1. Install display_builder + display_builder_views.
2. Create a view with a block display and enable the "Display Builder" display extender on that display (select a profile).
3. In the block display settings, check "Hide block if the view output is empty".
4. Add content to the Empty text area of the display (e.g. "No results found"). Header/footer content has the same effect.
5. Make the view return no results (e.g. add a filter that matches nothing).
6. Place the block and observe the page.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ipumpkin created an issue. See original summary.

prince.wang’s picture

Status: Active » Needs review
mogtofu33’s picture

Assigned: Unassigned » mogtofu33
mogtofu33’s picture

Would be great to have a test but it's probably a broader need on the whole hook which has none and a bunch of todos, will merge as it is for now, thanks!

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mogtofu33 committed 6964a651 on 1.0.x authored by ipumpkin
    feat: #3616238 Support Views block "Hide block if the view output is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.