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.
Part of #2006152: [meta] Don't call theme() directly anywhere outside drupal_render().
to test this code
- Visit Reports > Recent Log Messages
- Review the contents of the "Messages" column
- Click on the link in the message column, to see the full message
- Review the contents of the row labeled "Message"
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal-dblog-drupalRender-2008990-15.patch | 2.3 KB | heddn |
#11 | drupal-dblog-drupalRender-2008990-11.patch | 2.29 KB | heddn |
#11 | interdiff.txt | 576 bytes | heddn |
#8 | dblog-replace_theme_with_drupal_render_in_dblog-2008990-8.patch | 1.82 KB | giammi |
#8 | dblog-replace_theme_with_drupal_render_in_dblog-2008990-8.interdiff.txt | 701 bytes | giammi |
Comments
Comment #1
thedavidmeister CreditAttribution: thedavidmeister commentedComment #2
InternetDevels CreditAttribution: InternetDevels commentedWe are working today with this issue during Code Sprint UA.
Comment #3
InternetDevels CreditAttribution: InternetDevels commentedPatch attached.
Comment #4
podarok#3 nice
RTBC
Comment #5
catchShouldn't these be format_username()?
Comment #6
siccababes CreditAttribution: siccababes commentedIf we still want the linking functionality, I think it needs to be called from theme_username() instead of calling user_format_name() here, right? Let's leave this as-is and fix that if this is an issue. Follow up: #2019305: Call user_format_name from theme_username
Comment #7
alexpottI don't think we need to use drupal_render here...
just replacing this with...
Should work...
Comment #8
giammi CreditAttribution: giammi commentedGiving it a shot.
Comment #10
giammi CreditAttribution: giammi commentedError Message I received was:
HTTP response expected 200, actual 500 Browser DbLogTest.php 256
Checked the DbLogTest.php which gave
// View the database log report.
$this->drupalGet('admin/reports/dblog');
running /admin/reports/dblog gave me message
Fatal error: Call to undefined method stdClass::printed() in /home/giammi/coding/drupal/core/lib/Drupal/Core/Template/Attribute.php on line 105
Hope somebody else can take over.
Comment #11
heddnLet's give this a try.
Comment #12
nesta_ CreditAttribution: nesta_ commented#11: drupal-dblog-drupalRender-2008990-11.patch queued for re-testing.
Comment #13
nesta_ CreditAttribution: nesta_ commentedApplied the patch and everything running smoothly. Revised code and I like it.
Comment #14
alexpottJust a minor code style nit... otherwise looks great.
Missing some spaces... should be like this
Comment #15
heddnI missed that in the re-roll. Let's see how this flies.
Comment #16
pwieck CreditAttribution: pwieck commented@heddn changing status 'needs review', so test will run.
Comment #17
siccababes CreditAttribution: siccababes commentedI followed the instructions to test this code. I went to the list under recent log messages under reports, and I saw the messages. When I clicked on the message, I saw the same warnings. This code seems to work just fine.
Comment #18
alexpottCommitted d97d1aa and pushed to 8.x. Thanks!
Comment #19
jlbellidoComment #20.0
(not verified) CreditAttribution: commentedadd how to test