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_overlay().

<?php
function template_process_overlay(&$variables) {
 
$variables['page'] = $variables['page']['#children'];
}
?>

Proposed resolution

The template_process_overlay function needs to be removed from Drupal 8.

Remaining tasks

- Move this change of $variables['page'] to someplace else.
- Perhaps provide this change as part of a __toString method on the renderable object.

User interface changes

None.

API changes

None.

#1843650: Remove the process layer (hook_process and hook_process_HOOK)

Files: 
CommentFileSizeAuthor
#13 overlay-remove_template_process_overlay-1843768-13.patch1.05 KBbonus
PASSED: [[SimpleTest]]: [MySQL] 55,683 pass(es).
[ View ]
#8 overlay-remove_template_process_overlay-1843768-3.patch1009 bytesgregtorok
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch overlay-remove_template_process_overlay-1843768-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#6 overlay-remove_template_process_overlay-1843768-6.patch776 bytesevanmwillhite
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]
#2 overlay-remove_template_process_overlay-1843768-2.patch804 bytespmelab
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch overlay-remove_template_process_overlay-1843768-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

pmelab’s picture

Working with lollypic on it.

pmelab’s picture

Status:Active» Needs review
StatusFileSize
new804 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch overlay-remove_template_process_overlay-1843768-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Removed template_process_overlay and moved contents into template_preprocess_overlay.

Status:Needs review» Needs work
Issue tags:-Twig, -theme system cleanup

The last submitted patch, overlay-remove_template_process_overlay-1843768-2.patch, failed testing.

evanmwillhite’s picture

Status:Needs work» Needs review

Status:Needs review» Needs work
Issue tags:+Twig, +theme system cleanup

The last submitted patch, overlay-remove_template_process_overlay-1843768-2.patch, failed testing.

evanmwillhite’s picture

StatusFileSize
new776 bytes
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]

Rerolled patch against latest tip

evanmwillhite’s picture

Status:Needs work» Needs review
gregtorok’s picture

Status:Needs review» Needs work
StatusFileSize
new1009 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch overlay-remove_template_process_overlay-1843768-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
iankp’s picture

Status:Needs work» Needs review

Changing status so test bot tests the latest patch.

Status:Needs review» Needs work
Issue tags:-Twig, -theme system cleanup

The last submitted patch, overlay-remove_template_process_overlay-1843768-3.patch, failed testing.

dirtabulous’s picture

Status:Needs work» Needs review

Status:Needs review» Needs work
Issue tags:+Twig, +theme system cleanup

The last submitted patch, overlay-remove_template_process_overlay-1843768-3.patch, failed testing.

bonus’s picture

Status:Needs work» Needs review
StatusFileSize
new1.05 KB
PASSED: [[SimpleTest]]: [MySQL] 55,683 pass(es).
[ View ]

Rerolled patch.

Status:Needs review» Needs work
Issue tags:-Twig, -theme system cleanup

The last submitted patch, overlay-remove_template_process_overlay-1843768-13.patch, failed testing.

bonus’s picture

Status:Needs work» Needs review
Issue tags:+Twig, +theme system cleanup
dasjo’s picture

the given patch(es) only remove stuff, i can't see where it is added again?

Cottser’s picture

Issue tags:+Needs manual testing

Would like some manual testing on #13 - I can see it potentially being correct.

tlattimore’s picture

Issue tags:-Needs manual testing

I did some manual testing with daisydiff on this and everything seems to be working correctly... Not really sure why we can delete this entire function and it not affect anything, but that seems the case.

Cottser’s picture

Status:Needs review» Reviewed & tested by the community

Thanks for testing @tlattimore! I confirmed the testing results locally as well.

Here, Twig is running the page variable through render() which calls drupal_render(). drupal_render() will render the #children without any difficulty. So this makes sense to me. If you wanted to make a PHPTemplate version of the overlay template you would just do:

<?php
 
print render($page);
?>

overlay.tpl.php pre-conversion just did:

<?php
 
print $page;
?>
alexpott’s picture

Status:Reviewed & tested by the community» Fixed

Committed e3011f8 and pushed to 8.x. Thanks!

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

Anonymous’s picture

Issue summary:View changes

We have been informed that the __toString method will not be used until Drupal 9