Loading
Issue #2811795: Views Area causes Hide Block If Empty to Fail
Block::execute() asks outputIsEmpty() before the areas are rendered, which happens in a #pre_render callback. The view area only learned whether the view it embeds is empty in render(), so until then it fell back to AreaPluginBase::isEmpty(), which is FALSE for every area in "No results behavior". A block with "Hide block if the view output is empty" was shown, over empty markup, when the view it embeds had no results either.
Build the embedded view in isEmpty() when render() has not run yet, and keep the result so that render() does not run it a second time. An embedded view that is not set, not accessible or recursive renders nothing, and is now reported as empty.
Closes #2811795