admin/structure/block/add shows "Blocks" as page title, instead of "Add block".

The inherit-page-title-from-active-trail code contains an explicit condition to ignore local tasks in the active trail.

I wonder why that special-case exists at all.

Comments

Status: Needs review » Needs work

The last submitted patch, drupal.local-task-page-title.0.patch, failed testing.

sun’s picture

Status: Needs work » Needs review

Actually, the test results are awesome. At least the menu breadcrumbs are testing the current oddity of NOT showing the local task title, which obviously needs to be corrected with this patch.

hefox’s picture

Tried this patch to fix issue where the a set of pages defined as base/*, base/*/local_task, base/*/local_task2, and base/*/local_action were always showing 'Home' cause it didn't pick up any of the local tasks, and it fixed that, however actions look a bit confused.

On a different path (add term to tags).

Pre patch
Only local images are allowed.

Post Patch
Only local images are allowed.

Both aren't ideal; the former doesn't contain add term, the later doesn't contain vocabulary name (other than via the breadcrumb). I'm not sure if it's suppose to be different and it does fix the issue I have on the original patch (other than the action task is generally confusing lack of what it's an action to).

sun’s picture

Version: 7.x-dev » 8.x-dev

@hefox: That's a separate issue. The menu system can only output what has been defined. If the "Add term" (local action) page defines a static title, then a static title is output. However, you also need to know that the menu system currently does not have a separation for menu link titles and page titles, so if you'd change the link title to be dynamic (e.g., "Add term to Tags"), then you'd see that title as label for the local action (on the overview page) as well as a page title on the page itself. In such cases, the only existing workaround is to manually use drupal_set_title() to set a dynamic page title. But obviously, that kind of problem only applies to dynamic local tasks/actions that belong to dynamic parent items/entities in the first place. There are many local tasks/actions that are used within a static context.

jbrown’s picture

sun’s picture

@hefox' suggestion in #3 is somewhat in line with the change proposed #111081: Output title of current local task in HEAD title (e.g., "People » List")

Discussed with @merlinofchaos in IRC, and we think that the UX team should have a stab on the problem space first.

The original idea kinda was that breadcrumb, page title, and tabs together form the "page context".

With this patch, the title of a local task, say "Edit", would appear in a tab, and also in the page title. Sorta "duplication", but possibly not really, since users might primarily look at the page title; ignoring tabs and breadcrumb.

Bojhan’s picture

I think this would be a good improvement, however could we have a few more examples to build a picture of the impact of this patch? The duplication is not really a problem, since it is a important signifier on the page.

sun’s picture

StatusFileSize
new498 bytes
Bojhan’s picture

I have just reviewed this. But I am a bit confused because for example menu/manage/management/edit has the label management and something like config/media/image-styles/edit/medium has Edit medium style. Although the last seems the favorable standard, I do not see it anywhere else.

Status: Needs review » Needs work

The last submitted patch, drupal8.menu-local-task-page-title.8.patch, failed testing.

Bojhan’s picture

Issue tags: -Needs usability review

See question above

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new8.28 KB

Re-rolled against latest branch HEAD.

Test should pass with attached patch.

I'm not sure what's going on with the page title on administration pages for system menus; e.g.,

admin/structure/menu/manage/navigation/add should normally show "Add link"

but it shows "Navigation"

However, it works correctly for menus that are not system menus; e.g., with Devel installed,

admin/structure/menu/manage/devel/add correctly shows "Add link"

sun’s picture

Issue tags: -Usability

Status: Needs review » Needs work
Issue tags: +Usability

The last submitted patch, drupal8.menu-local-task-page-title.12.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new8.45 KB

Re-rolled against HEAD.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, drupal8.menu-local-task-page-title.15.patch, failed testing.

dawehner’s picture

Version: 8.x-dev » 7.x-dev
Issue summary: View changes

Given that the page title and the tab title is now 100% separated this issue does not make sense, beside maybe d7.

sun’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Closed (won't fix)

Yes, I assume/hope this is obsolete now. Can't be changed for D7, because it's a major API/UI change.

David_Rothstein’s picture

Title: Pages of local tasks don't display local task title as page title » Pages of local actions don't display local action title as page title
Version: 8.0.x-dev » 7.x-dev
Status: Closed (won't fix) » Needs review
StatusFileSize
new490 bytes

As titled I think this is a won't fix for Drupal 7, but the original issue wasn't about local tasks in general, it was about local actions:

admin/structure/block/add shows "Blocks" as page title, instead of "Add block".

I think for local actions this is a legitimate bug. The words "Add block" literally appear nowhere on the page right now, so it's not even clear what the action you're performing is. (At least for other local tasks, e.g. "Edit", the action you're performing appears as the highlighted tab.)

Here's a patch that just fixes local actions. I assume it will break some tests, but the real question is whether it breaks any important assumptions other code out there is making.

berliner’s picture

StatusFileSize
new670 bytes

The last patch for D7 doesn't apply to the current dev version anymore, so here is a new one doing exactly the same thing.

I haven't looked into any repercussions either.

Status: Needs review » Needs work

The last submitted patch, 21: local-action-title-996302-21.patch, failed testing. View results

berliner’s picture

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.