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.
Subtask of #1830588: [META] remove drupal_set_title() and drupal_get_title()
Problem/Motivation
Using procedural drupal_set_title() inside controller class is not encouraged.
Proposed resolution
Replace drupal_set_title() with #title in page return array.
Remaining tasks
Issue patch
User interface changes
Refer parent issue at #1830588: [META] remove drupal_set_title() and drupal_get_title()
API changes
Refer parent issue at #1830588: [META] remove drupal_set_title() and drupal_get_title()
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#10 | drupal8.help-module.2102453-10.patch | 1.01 KB | ACF |
#8 | drupal8.help-module.2102453-8.patch | 739 bytes | ACF |
#4 | drupal-remove_drupal_set_title_in_help_module-2102453-4.patch | 851 bytes | InternetDevels |
#1 | drupal8.help-module.2102453-1.patch | 3.46 KB | JulienD |
Comments
Comment #1
JulienD CreditAttribution: JulienD commentedHere is a try to remove the drupal_set_title in the help module.
According to https://drupal.org/node/2102369#comment-7930793 I have left the title callback in the hook_menu.
Comment #2
vijaycs85Not sure we really need to t() the dynamic name?
Comment #4
InternetDevels CreditAttribution: InternetDevels commentedMore simpler solution.
Comment #6
disasm CreditAttribution: disasm commented#4: drupal-remove_drupal_set_title_in_help_module-2102453-4.patch queued for re-testing.
Comment #7
dawehnerWe should check plain the output, just to be sure and mirror the previous behavior.
Comment #8
ACF CreditAttribution: ACF commentedAdded check_plain to the previous patch.
Comment #9
dawehnerLet's use String::checkPlain
Comment #10
ACF CreditAttribution: ACF commentedAdded.
Comment #12
ACF CreditAttribution: ACF commented#10: drupal8.help-module.2102453-10.patch queued for re-testing.
The test that failed looks random as it is Drupal\system\Tests\File\RemoteFileUnmanagedMoveTest.
Comment #13
dawehnerPerfect!
Comment #14
catchCommitted/pushed to 8.x, thanks!