This is part of #2046881: [meta] Avoid "early rendered" strings where beneficial to do so, build structured data to pass to drupal_render() once instead.
Line 147 of authorize.php:
$output = drupal_render($elements);
This $output is only used in the following:
print theme('maintenance_page', array('content' => $output, 'show_messages' => $show_messages));
maintenance-page.html.twig does this:
{{ content }}
This means the initial render of $output is useless and we should be able to safely turn this:
// We have a batch to process, show the filetransfer form.
$elements = drupal_get_form('authorize_filetransfer_form');
$output = drupal_render($elements);
into:
// We have a batch to process, show the filetransfer form.
$output = drupal_get_form('authorize_filetransfer_form');
Comments
Comment #1
thedavidmeister commentedComment #2
stephaneqComment #3
thedavidmeister commentedThat patch seems fine to me. Just need someone to verify the markup is unaltered.
Comment #5
thedavidmeister commentedthis looks like the same trouble as #2060413: remove useless "early render" in update_selection_page()
Comment #6
thedavidmeister commentedpostponed on #2072647: #theme 'maintenance_page' should support render arrays in #content
Comment #7
thedavidmeister commentedno longer postponed.
Comment #8
ianthomas_ukI'm not really sure how to test this, but here's a reroll of #2 which also replaces drupal_get_form because it's a deprecated function.
There are a couple of drupal_renders higher up the page, but their output is being concatanated. Is it possible to stop those from being early rendered too?
Comment #9
Jalandhar commentedComment #12
risse commentedReroll.
Comment #13
andypostalready fixed