Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We are eliminating the process layer from Drupal 8, since the reasons for it's existence can now be solved in different ways. One of the functions on the chopping block is template_process_maintenance_page().
function template_process_maintenance_page(&$variables) {
$variables['head'] = drupal_get_html_head();
$variables['css'] = drupal_add_css();
$variables['styles'] = drupal_get_css();
$variables['scripts'] = drupal_get_js();
}
Proposed resolution
The template_process_maintenance_page function needs to be removed from Drupal 8.
Remaining tasks
- Move addition of all variables that are renderables to the preprocess layer
- delete the function template_process_maintenance_page
User interface changes
None.
API changes
TBD
Blockers (Issues)
#1843708: drupal_get_html_head() should not call drupal_render
Related Issues
#1843650: Remove the process layer (hook_process and hook_process_HOOK)
Comments
Comment #1
jenlamptontagging.
Comment #2
star-szrFixing typo in title.
Comment #3
dirtabulous CreditAttribution: dirtabulous commented-Moved all variables to the preprocess layer
-deleted the function template_process_maintenance_page
Comment #4
dirtabulous CreditAttribution: dirtabulous commentedRerolled patch. Includes fix for Bartik theme and the maintenance css.
Comment #6
dirtabulous CreditAttribution: dirtabulous commented#4: core-remove_template_process_maintenance_page-1843710-4.patch queued for re-testing.
Comment #8
dasjoattached is a reroll that moves the bartik related fix over to #2003814-11: Remove Bartik process layer functions, refactor color module alterations in order to prevent patches conflicting each other.
Comment #9
dasjoComment #10
tlattimore CreditAttribution: tlattimore commentedThis seem like it's a goofy way to write this but it's how it is already written for the template_process_maintenance_page() function.
I guess the goal of this issue isn't really cleanup, just to get rid of process function. From that standpoint it looks good to me.
Comment #11
jenlampton#9: core-remove_template_process_maintenance_page-1843710-8.patch queued for re-testing.
Comment #13
jenlamptonthought it might fail :/
Comment #14
LinL CreditAttribution: LinL commentedRe-rolled.
Comment #16
LinL CreditAttribution: LinL commentedFailed because language_css_alter() is gone #2015789: Remove language_css_alter() (RTL stylesheets) in favor of HTML 'dir' attribute
Is it as simple as just deleting that line?
Comment #17
LinL CreditAttribution: LinL commentedComment #19
LinL CreditAttribution: LinL commentedAlso noticed a reference to
template_process_maintenance_page
here:Not sure what that should be replaced with?
Comment #20
star-szrI didn't realize when this came up for reroll that #2004286: Defer calls to drupal_get_* functions until printed inside a template by adding a RenderWrapper class actually removes template_process_maintenance_page(). I think we can close this one as a duplicate. Thanks very much for your work on both issues @LinL :)