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.
Task
Convert theme_ functions to Twig templates.
Remaining
- theme_ function -> Twig conversions (and preprocess function additions or changes) moved over from the existing conversion issue
- Patch review
- Profiling
Theme function name | Conversion status |
---|---|
theme_overlay_disable_message | @todo move from #1898436: overlay.module - Convert PHPTemplate templates to Twig |
Related Issues
#1898436: overlay.module - Convert PHPTemplate templates 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 |
---|---|---|---|
#21 | interdiff.txt | 408 bytes | chrisjlee |
#21 | 1987408-overlay-convert-theme-21.patch | 2.71 KB | chrisjlee |
#19 | interdiff-1987408-18.txt | 3.62 KB | chrisjlee |
#18 | 1987408-overlay-convert-theme-18.patch | 2.76 KB | chrisjlee |
#16 | 1987408-overlay-profiling-tweak-do-not-test.patch | 404 bytes | star-szr |
Comments
Comment #0.0
star-szrUpdated issue summary.
Comment #1
c4rl CreditAttribution: c4rl commentedPer #1757550-44: [Meta] Convert core theme functions to Twig templates, retitling to indicate this issue applies to theme_ functions rather than templates. See #1898436: overlay.module - Convert PHPTemplate templates to Twig for template conversion.
Comment #1.0
c4rl CreditAttribution: c4rl commentedUpdated issue summary.
Comment #2
chrisjlee CreditAttribution: chrisjlee commentedPatch split for #1898436: overlay.module - Convert PHPTemplate templates to Twig as requested by Cottser in #30.
Comment #4
star-szrAs discussed with @chrisjlee this just looks to be missing overlay-disable-message.html.twig from #1898436-22: overlay.module - Convert PHPTemplate templates to Twig.
Comment #5
gnugetThe same patch as in #2 but including the overlay-disable-message.html.twig file
Comment #6
jstoller#5: 1987408-convert-theme-functions-to-twig-5.patch queued for re-testing.
Comment #8
jstollerWorking on a re-roll now.
Comment #9
jstollerRe-roll.
Comment #10
jstollerOops. Missed something.
Comment #11
misselbeck CreditAttribution: misselbeck commentedProfiling output
Comment #13
ezeedub CreditAttribution: ezeedub commented#10: convert-overlay-theme-functions-to-twig-1987408-10.patch queued for re-testing.
Comment #14
ezeedub CreditAttribution: ezeedub commentedSame number of function calls in last test, re-tagging...
Comment #15
ezeedub CreditAttribution: ezeedub commentedi'm trying to hit the path overlay/dismiss-message and getting access denied. even as admin (though i need to hit it as anon to profile)
i've set overlay_user_dismiss_message_access() to return true and called menu_router_rebuild(), but still access denied (still, even as admin). any ideas?
Comment #16
star-szrProfiling results:
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=51abc4cb0a647&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=51abc4cb0a647&...
Markup testing checked out, performed visual diff and DaisyDiff for /node/add?render=overlay.
For overlay profiling I set the path in find-min-web.sh to /node/add?render=overlay and gave anonymous users the following permissions:
Should have noted this in #1898436: overlay.module - Convert PHPTemplate templates to Twig.
In addition to the steps above, a small tweak was needed here to make the overlay disable message show up for anonymous users, since it normally only shows up for authenticated users. Patch attached was applied on both branches to fake an authenticated user for the purposes of the overlay disable message.
Comment #17
star-szrTwo small tweaks I found:
1. Can we move the new preprocess function so that it's in the same place as the old theme function in overlay.module? i.e. directly after overlay_disable_message(). This will make the patch smaller and easier to review.
2.
Single quotes here please per https://drupal.org/node/1823416#filters.
Comment #18
chrisjlee CreditAttribution: chrisjlee commentedChanges as requested by @Cottser in #17
Comment #19
chrisjlee CreditAttribution: chrisjlee commentedForgot Interdiff
Comment #20
star-szrNice, thanks @chrisjlee :)
Super uber nitpick then I will happily RTBC:
Extra blank line added before the next function can be removed.
Comment #21
chrisjlee CreditAttribution: chrisjlee commentedNice catch.
Comment #22
star-szrThanks, looks great now :)
Comment #23
alexpottCommitted 23357e2 and pushed to 8.x. Thanks!
Comment #24.0
(not verified) CreditAttribution: commentedClarify tasks