Problem/Motivation

In #2286357: Introduce Display Variants, use for the block rendering flow, we adjusted block_page_build() to add blocks from the full page variant.

Proposed resolution

Because #2292733: [meta] Introduce Display objects might eventually mean taking over the entire rendering process, we should start by using an alternate HtmlFragmentRenderer to handle the blocks.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Comments

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new4.06 KB
tim.plunkett’s picture

Note, I chose to continue extending DefaultHtmlFragmentRenderer because we're only adding in the blocks. Eventually we could just implement HtmlFragmentRendererInterface directly.
However, if I tried to do that, I'd be blocked by #2295367: BatchController should not rely on DefaultHtmlFragmentRenderer directly.

Status: Needs review » Needs work

The last submitted patch, 1: block-2295363-1.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
StatusFileSize
new4.49 KB
new4.14 KB
new1.44 KB
new820 bytes

Well, that was surprising.
We need to contend with the main content fallback code. Here are two options.

Status: Needs review » Needs work

The last submitted patch, 4: block-2295363-4a.patch, failed testing.

The last submitted patch, 4: block-2295363-4b.patch, failed testing.

eclipsegc’s picture

I'm working on a patch for this that moves drupal_prepare_page() into DefaultHtmlFragmentRender::preparePage() and subsequently results in being able to remove both drupal_prepare_page and drupal_render_page. I'm still debating this approach, but I think it makes sense the more I play with it. It's just a matter of getting all the parts in the right places and updating the code that manually references those things already... which isn't actually all that much code. (I was surprised)

I'll see if I can get something up soonish.

Eclipse

tim.plunkett’s picture

Status: Needs work » Needs review
StatusFileSize
new4.16 KB

Status: Needs review » Needs work

The last submitted patch, 8: 2295363-block-8.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
StatusFileSize
new6.56 KB
new2.4 KB

Status: Needs review » Needs work

The last submitted patch, 10: 2295363-block-10.patch, failed testing.

Crell’s picture

Just cross linking...

tim.plunkett’s picture

eclipsegc’s picture

catch’s picture

Status: Needs work » Closed (duplicate)

'Unfortunately' #2352155: Remove HtmlFragment/HtmlPage completely fixed this issue by moving block addition to the display variant.