When BigPipe is enabled, and facet blocks are added via lazyBuilder, they get an additional

wrapped around each of them.

Original markup

Markup after replacement

One consequence is that when the facet blocks are printed in a region (containing only those facet blocks) and the facets blocks are empty, the region will always have "content", which can lead to a lot of theming issues.

Tried to figure out why those div's are added, without luck.

So far, turning off BigPipe will fix the issue.

Comments

andreasderijcke created an issue. See original summary.

andreasderijcke’s picture

Issue summary: View changes
borisson_’s picture

One consequence is that when the facet blocks are printed in a region (containing only those facet blocks) and the facets blocks are empty, the region will always have "content", which can lead to a lot of theming issues.

I think that's by design - see also https://www.drupal.org/node/2851410#comment-12032198 and Wim's reply in that same issue + #953034: [meta] Themes improperly check renderable arrays when determining visibility.
I'm not 100% sure if the reason is the same - but the "fix" (don't rely on conditional regions) is the same.

Even if there's an issue - I think this deserves to be a drupal core issue.

wim leers’s picture

Status: Active » Closed (duplicate)
wim leers’s picture

Title: Facets blocks loaded with BigPipe wrapped in additional div » [PP-2] Facets blocks loaded with BigPipe wrapped in unwanted <div> due to bug in AJAX system
Status: Closed (duplicate) » Postponed

Actually, it's probably better to keep this issue around so that people can actually find this problem, and don't report it again and again.

This is postponed on #2738685: BigPipe leaves wrapper <div>s in place, because AJAX system leaves them — this can cause some CSS to break, which is in turn postponed on #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs.

wim leers’s picture

Title: [PP-2] Facets blocks loaded with BigPipe wrapped in unwanted <div> due to bug in AJAX system » Facets blocks loaded with BigPipe wrapped in unwanted <div> due to bug in AJAX system
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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