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.
Issue #2151093 by joelpittet, InternetDevels, c4rl, mark.labrecque, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1, quietone | Cottser: Convert theme_admin_block_content() to Twig
Task
Convert theme_admin_block_content() to a Twig template.
Remaining tasks
- Patch
- Patch review
- Manual testing
- Profiling
Steps to test
/admin/config is a good place to test.
It is important to ensure that if your current administration theme does not override the core theme function. The best way to ensure this is to switch you adminstration theme to a "vanilla" theme, such as Stark.
Comment | File | Size | Author |
---|---|---|---|
#23 | 2151093-23.patch | 3.73 KB | quietone |
#20 | interdiff.txt | 1.08 KB | star-szr |
#20 | 2151093-20.patch | 3.73 KB | star-szr |
#15 | twig-theme_admin_block_content-2151093-15.patch | 3.78 KB | InternetDevels |
#10 | before-twig-conversion-6.png | 18.9 KB | mark.labrecque |
Comments
Comment #1
joelpittetSplit from the system module to twig meta.
Comment #2
star-szrAdding a commit message to the issue summary so the folks who already worked on #1987410: [meta] system.module - Convert theme_ functions to Twig and #1898454: system.module - Convert PHPTemplate templates to Twig (comment #41 and above aka @c4rl) get credit.
Comment #3
star-szrFix up issue summary.
Comment #6
joelpittet1: 2151093-1-twig-theme_admin_block_content.patch queued for re-testing.
Comment #8
star-szr1: 2151093-1-twig-theme_admin_block_content.patch queued for re-testing.
Edit: I ran both tests locally through the UI and run-tests.sh and got some fails on
Drupal\views\Tests\DefaultViewsTest
but the same fails with or without the patch. So trying once more.Last run's test failures:
Comment #9
mark.labrecqueComment #10
mark.labrecqueThe patch has been manually tested/verified. The markup provided by the template is identical pre- and post-patch. See screenshots provided for proof.
Comment #11
mark.labrecqueComment #12
mark.labrecqueComment #13
joelpittetI created the patch so I can't RTBC on this one but it's +1 for me. Thanks @mark.labrecque for joining in on the sprint!
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=52e49caf3c7f2&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=52e49caf3c7f2&...
Comment #14
star-szrTagging for reroll.
Comment #15
InternetDevels CreditAttribution: InternetDevels commentedHere is the re-roll.
Comment #16
star-szrComment #17
RainbowArrayTested the reroll in #15. It shows the appropriate markup as shown in #10. Looks good to go.
Comment #18
star-szrComment #19
star-szrUpdating the suggested commit message.
Comment #20
star-szris_compact_mode is not available in the Twig template so removing from the docblock and making another very minor doc tweak in line with https://drupal.org/node/1354#themepreprocess. Looks good to me.
Comment #21
star-szrJust making a note that this may conflict with #2191845: theme_admin_block_content() documentation is out of date.
Comment #22
star-szr'aded' is a typo here, should be changed to 'added' :)
Good novice task for practice/learning, so tagging to create a new patch and interdiff with this change.
Comment #23
quietone CreditAttribution: quietone commentedHere's the patch with 'added' instead of 'aded'.
Comment #24
quietone CreditAttribution: quietone commentedComment #26
star-szr23: 2151093-23.patch queued for re-testing.
Comment #27
star-szrI manually diffed the two patches, the change looks good. Thanks @quietone!
Comment #28
star-szrAmending suggested commit message.
Comment #29
alexpottCommitted f674cd2 and pushed to 8.x. Thanks!