Issue #1987426 by shanethehat, Cottser, intergalactic overlords, mr.baileys: Convert maintenance-page.tpl.php to Twig.
(as of #24)
Task
Convert PHPTemplate template to Twig template.
Remaining
- PHPTemplate -> Twig conversions (and preprocess function additions or changes) moved over from the existing conversion issue
- Patch review
- Profiling
| Template path | Conversion status |
|---|---|
| core/modules/system/templates/maintenance-page.tpl.php | @todo move from #1885564: theme.maintenance.inc (authorize.php) - Convert theme_ functions to Twig |
Profiling results
=== maintenance-8.x..maintenance-8.x compared (5198e3e70582e..5198e40fe548a):
ct : 16,779|16,779|0|0.0%
wt : 107,215|107,272|57|0.1%
cpu : 92,854|91,872|-982|-1.1%
mu : 8,880,128|8,880,128|0|0.0%
pmu : 8,954,144|8,954,144|0|0.0%http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=5198e3e70582e&...
=== maintenance-8.x..maintenance-1987426-8 compared (5198e3e70582e..5198e42044d2e):
ct : 16,779|16,913|134|0.8%
wt : 107,215|107,756|541|0.5%
cpu : 92,854|93,301|447|0.5%
mu : 8,880,128|8,928,920|48,792|0.5%
pmu : 8,954,144|8,996,048|41,904|0.5%http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=5198e3e70582e&...
Manual testing steps
- maintenance-page.html.twig - set default theme to Stark, enable maintenance mode, and view the site as an anonymous user.
Related Issues
#1885564: theme.maintenance.inc (authorize.php) - Convert theme_ functions to Twig
#1757550: [Meta] Convert core theme functions to Twig templates
#1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 1987426-15.patch | 8.35 KB | star-szr |
| #15 | interdiff.txt | 1.64 KB | star-szr |
| #8 | 1987426-8.patch | 9.99 KB | star-szr |
| #8 | interdiff.txt | 1.52 KB | star-szr |
| #4 | interdiff.txt | 9.78 KB | shanethehat |
Comments
Comment #0.0
star-szrUpdated issue summary.
Comment #0.1
c4rl commentedUpdated issue summary.
Comment #0.2
c4rl commentedList templates
Comment #1
shanethehat commentedComment #2
shanethehat commentedComment #4
shanethehat commentedFixed spelling mistake on file name, and corrected a few missed documentation references.
Comment #6
shanethehat commented#4: twig-maintainance-page-template-only-1987426-4.patch queued for re-testing.
Comment #8
star-szrThe template filename needed another quick fix-up and I tweaked some docs. Thanks for getting this going @shanethehat :)
Comment #9
jenlamptondo we need to add bartik and seven's override of this template file into this issue as well?
For now I'm leaving seven's conversion over in #1938848: seven.theme - Convert PHPTemplate templates to Twig
And bartik's is in #1938840: bartik.theme - Convert PHPTemplate templates to Twig
Comment #10
star-szr@jenlampton - we could move them here but I see no need, testbot is happy with them being separate.
Comment #11
intergalactic overlords commentedtwig returns same html as tpl.php
Comment #12
intergalactic overlords commentedHave been a bit overeager I guess. Anyhow, this has been manually tested.
Comment #13
hydra commentedTwig template is working well as far as I can see. What are your concenrns @intergalactic overlords? For me this seems RTBC.
Comment #14
intergalactic overlords commentedYou are right, it is working great. I was confused about when I could change the patch status to 'reviewed & tested by the community'.
Comment #15
star-szrThanks for the reviews!
Just removing the changes to bartik.theme and seven.theme, they are identical to the changes made in #1938840: bartik.theme - Convert PHPTemplate templates to Twig and #1938848: seven.theme - Convert PHPTemplate templates to Twig. No other changes.
Comment #16
hydra commentedLooks good to me =)
Comment #17
mr.baileysAssigning to me to take care of profiling.
Comment #18
mr.baileysDid 4 separate runs, getting the same numbers consistently.
Comment #19
star-szrI did this one on the plane, this needs special treatment. Will post results later today.
Comment #20
mr.baileysComment #21
star-szrAdded this to the end of template_preprocess_maintenance_page():
Loading the extra node is for the purpose of isolating profiling to this conversion only, not loading all of the Twig classes etc.
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=5198e3e70582e&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=5198e3e70582e&...
Comment #21.0
star-szrUpdated summary
Comment #22
thedavidmeister commentedoops, I don't think this was ever manually tested.
Comment #23
thedavidmeister commentedMy bad. See #12 for manual testing confirmation.
Comment #24
alexpott+1. Ready for #1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch
Comment #24.0
alexpottAdd profiling results
Comment #25
alexpottCommitted d7f5a1a and pushed to 8.x. Thanks!
Comment #26.0
(not verified) commentedUpdated issue summary.