Problem/Motivation

While developing the 7.x file_checker module (currently sandbox) i noticed the page title is not working for some pages. Install the media / file entity modules you will get a new menu item / page named 'Thumbnails', but when visiting this page the title will still read 'Content'.

It looks like the main top level menu item is set as the page title, and not the correct local task title from the menu.

Previous patch was an attempt to fix this in contrib, but after some talks / irc and searching, we are now convinced this needs to be fixed in core. Implementing the original fix in media, file_entity, file_checker, and so on, would not be the correct way to deal with this + if we would have, we have yet another piece of code to keep an eye on, because we would later have to remove it anyway. (and that's something we really try to prevent).

Currently core handles this for a couple of edge cases, breaking a bunch of local tasks. Patch attached to #5 is a first attempt.

More discussion: #1888782: Fix admin page title

Proposed resolution

  • Fix menu_get_active_title() to use the correct local task title

I am not sure at this point if we first need to fix this upstream (D8), or that this will be a D7-bugfix-only, that's open for debate.

Remaining tasks

  • TBD

User interface changes

  • The page title will display correctly once fixed for local tasks.

API changes

  • TBD

Original report by Rob C

This patch makes the page title show up as 'Files' for the file admin page. It now renders as 'Content', and that's not correct. Just a very minor thing.

Similar patch for Media:
#1888782: Fix admin page title

Comments

dave reid’s picture

The 'Comments', 'Book' and other tabs under admin/content have the same problem. Maybe this is a bug that should be fixed in core, or considered works as designed?

slashrsm’s picture

I would agree with Dave. If this is a common problem for all pages under Content, it should probably be fixed in core.

ParisLiakos’s picture

Title: Fix admin page title » Page title is wrong for some local tasks
Project: File Entity (fieldable files) » Drupal core
Version: 7.x-2.x-dev » 7.x-dev
Component: Code » menu system
Status: Needs review » Active
ParisLiakos’s picture

Issue summary: View changes

Added related link.

ParisLiakos’s picture

Version: 7.x-dev » 8.x-dev
Priority: Minor » Normal

yeah, should go in d8 first..same bug there as well

Rob C’s picture

Just a test.

I'm not sure if this is the correct way. Yes, it could be done simpler, but with all the changes to the menu system over the last 2 years... I can not find why we change the basic way we deal with local task titles for what i see are just a couple edge cases that indeed work, but effectively end the correct operation for Loads of other local tasks, but i do see the reason.

So yes, this does need more work, and maybe we can check for a 'map' first, that's what i'm searching for now. More info is very welcome!

Rob C’s picture

Issue summary: View changes

Updated to new status.

Status: Needs review » Needs work
Anonymous’s picture

Issue summary: View changes

Update issue - patch link.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Version: 8.9.x-dev » 7.x-dev
Issue tags: +Bug Smash Initiative

I tested this on Drupal 8.9.x, 9.3. and the page titles were correct and match what I understand from the IS. The problem is still found in Drupal 7-8.dev. Therefore, moving to the Drupal 7 issue queue.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.