Subtask of #1830588: [META] remove drupal_set_title() and drupal_get_title()

Problem/Motivation

Removing drupal_set_title() is release-blocking for Drupal 8.

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()

Comments

wesleydv’s picture

Assigned: Unassigned » wesleydv

Assigning

wesleydv’s picture

Status: Active » Postponed

This issue is currently blocked by #1972990: Convert tracker_page() to a Controller

ACF’s picture

Title: Remove drupal_set_title in tracker module controllers » Add back in tab removed in [#1972990] and remove drupal_set_title in tracker module controllers
Assigned: wesleydv » Unassigned
Status: Postponed » Needs review
StatusFileSize
new2.66 KB

In converting tracker_page to a controller in #1972990: Convert tracker_page() to a Controller the tracker tab wasn't maintained. The way that the new system works the tab can be named seperately of the page title and therefore the drupal_set_title could go. I've added in tests to check the title and tab is being set correctly.

dawehner’s picture

Issue summary: View changes
Status: Needs review » Needs work
-      // When viewed from user/%user/track, display the name of the user
-      // as page title -- the tab title remains Track so this needs to be done
-      // here and not in the menu definition.
-      drupal_set_title(user_format_name($account));

Do we really want to change the behavior from using the username to just "Track"? For me this feels wrong.
You should set #title on the resulting render array in order to keep the same functionality.

vijaycs85’s picture

Status: Needs work » Needs review
StatusFileSize
new3.28 KB
new635 bytes

@dawehner, I guess we are just adding the tab 'Track' here. The title of the page is already handled by TrackerUserTab::getTitle(). Since we are removing drupal_set_title() here, updating the title callback to use new method $user->getUsername()instead of deprecated user_format_name().

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

You are so right, I could just not read the patch/test properly.

dipen chaudhary’s picture

Seems like testbot issue, unable to load image from test images. Local test runs fine.

Crell’s picture

xjm’s picture

Priority: Normal » Critical
Issue summary: View changes
Issue tags: +Needs reroll, +D8 cacheability, +beta blocker

Tagging and bumping as a child of the meta.

vijaycs85’s picture

Issue tags: -Needs reroll
vijaycs85’s picture

Status: Needs work » Reviewed & tested by the community

Still the patch applies. As per #6, setting back to RTBC

Crell’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.