Problem/Motivation
As part of #3343940: Field UI 2023 User Research, we noticed few challenges related to our use of local tasks:
- Few of the test participants navigated to edit fields of an incorrect bundle or even incorrect entity type. When asked, they thought they were editing the entity type or bundle we instructed them to edit. Without knowing the content model of the site, the only indication in the UI that this is not the case is in the breadcrumb
- Users don't always understand what's the context for the tabs (especially problematic for the second level). For example, on Manage Display there are "Default" and "Teaser" tabs, and users didn't realize they were view modes.
Nielsen Norman describes this navigation pattern as local navigation. Their definition is following:
Local navigation is a type of navigation that is contextual to the user’s current location — showing sibling pages within the current category, and if applicable, the children or nieces and nephews of the current page.
It also says that:
local navigation indicates the category of the current page and, thus, works as an orientation element.
Currently the only UI element that indicates the category and helps with the orientation is the breadcrumb.

We are also rendering the local tasks as horizontal tabs. The design pattern usually makes people expect it to change content below the tabs, not above it. This is why navigating using Drupal local tasks (rendered as horizontal tabs) feel strange to at least some of the users.
Proposed resolution
Allow displaying the page title based on the current local tasks context. This is configurable in the page title block, which is updated to use the new pattern by default in Claro. Other themes continue to use the previous experience unless they explicitly opt-in.
We need to also figure out how to indicate the correct page title for screen readers. Current proposal is to append the current page title (current tab) to the page title: [Section page title]: [Current page title], e.g. Article: Manage fields.
We are also proposing to append the section title to the document title: [Current page title] | [Section page title] | [Site title], e.g. Manage fields | Article | Drupal. We could potentially change the separator to something like : or ». This will require changes to templates, so to keep the scope of this issue as tight as possible, ideally this could be done in a follow-up.

How this looks like with the current page titles can be seen in: https://docs.google.com/spreadsheets/d/1XhQtXZA1JCwa8qnE3vp8gyW8HJT8zZxg....
Here's how the pattern looks like on Github.com.
Interesting note is that the new behavior we are adding is also how Drupal 7 page titles worked! It doesn't look like it was an intentional change from UX perspective.
Remaining tasks
Write a prototype patch for this and confirm with user tests that the change is an improvement over the status quo.✅: #3379160: Toolbar Prototype Usability Testing Phase IDecide how to handle the screenreader titles.✅
User interface changes
API changes
Data model changes
Release notes snippet
This is a UX improvement to display the page title based on the current local tasks context. Previously the page title was always displaying the current page title which was confusing to some users because this left breadcrumb as the only UI element that indicates the current context.
- The page title block now have a new option to display the page title based on the current local tasks context. In Claro it is updated to use this new pattern by default. Other themes continue to use the previous experience unless they change their configuration and/or provide an upgrade path.
- The document title is also updated to include the section title.
| Comment | File | Size | Author |
|---|---|---|---|
| #115 | 3370946-page-title-backport-10-2-10.patch | 81.37 KB | _pratik_ |
| #113 | 3370946-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3370946
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lauriiiComment #4
lauriiiComment #5
lauriiiComment #6
kunal.sachdev commentedComment #7
kunal.sachdev commentedI tested it on my local and it works fine, it’s definitely an improvement 👍🏻
But this would be applied for all the pages but on some pages we don't need it like for login page('user/login') and I don't think we need it as it will show title as 'My account' instead of 'Log in'.
Comment #8
kunal.sachdev commentedJust paired with @lauriii and we found that our current change in
\Drupal\Core\Render\MainContent\HtmlRenderer::prepare()is incorrect as it also affects the browser tab title which we don't want. I'll revert that change.Comment #9
tim.plunkettComment #11
kunal.sachdev commentedCurrently the title shown on page 'admin/structure/block-content/manage/basic' is 'Edit Basic block block type' because we override the title in '\Drupal\block_content\BlockContentTypeForm::form' but now in this current MR we again override it in 'PageTitleBlock' based on base route and now it shows the title as 'Edit Basic block'. So I think we need to decide what we want (that could be done in a follow-up). I think it should be 'Basic block' and not 'Edit Basic block block type' because the 'Edit' word is already shown on the tab and 'Block Types' is shown on the breadcrumbs. See the
which shows edit basic block page based on the current MR.
Comment #12
kunal.sachdev commentedComment #13
kunal.sachdev commentedThe tests are failing because now we use the correct service '@router'(AccessAwareRouter) in 'RequestGenerator' but what this does is it checks the access for the route but PageTitleBlock uses '@router' for the matching of request for base route so it will check it's access and and it'll fail as the tests obviously don't grant the permissions for base route.
I think for PageTitleBlock we'll have to use 'router.no_access_checks' for the matching of request for base route so it will not check it's access.
Comment #14
kunal.sachdev commentedComment #15
kunal.sachdev commentedComment #16
lauriiiThere's some excellent feedback on #2514218-120: [regression] Pages Manage Fields, Manage form, Manage display should include name of content type or entity from @rkoller. Looks like This has been also discussed several times on the Friday UX calls: #2514218-101: [regression] Pages Manage Fields, Manage form, Manage display should include name of content type or entity (which I had missed). I think the proposal for Pattern A is really interesting and it looks like something we should try to implement here. I think it aligns well with what is already being done here, but does increase the scope slightly. The reason we should implement the solution from there, is that it improves the accessibility of the current solution (the current solution has not been reviewed for accessibility yet).
The proposed pattern there is:
Page title:
[Action aka Primary Tab Name] for [Name] [Entity Type] | [Site Name]Manage fields for Article content type | My Drupal 9 site
h1 for sighted users:
[Name - wrapped in em tag] [Entity Type]Article content type
h1 for screenreader users:
[Action aka Primary Tab Name] for [Name - wrapped in em tag] [Entity Type]Manage fields for Article content type
What could we implement here?
I'm wondering if we could change the page title to follow a simpler pattern? A separator character would provide a clearer separation between the two titles, which could help in particular with sighted users who would only see a shorter page title.
Another concern I have, is that "for" is not something that translates well in all languages, and if we use the same translation string for the screenreader and the page title, it may lead into substandard screenreader experience due to translations that are optimized for page title. For this reason, I'd propose following pattern for the page title:
Page title:
[Current page title] | [Section page title] | [Site Name]Manage fields | Article | My Drupal 9 site
The screenreader and sighted users map pretty close to what we have here; we could just prepend the current page title to the section page title. Unfortunately, this won't include the current bundle name automatically in the page title. However, I believe this architecture is able to accommodate this requirement. Once we have set up the infrastructure here, in a follow-up issue we could update the page titles to append the bundle name to the section page title.
This would result in the following titles as part of this issue:
h1 for sighted users:
[Section page title]Article
h1 for screenreader users:
[Current page title] for [Section page title]Manage fields for Article
How should we implement this?
One idea for how we could implement this is to convert the current logic from
\Drupal\Core\Block\Plugin\Block\PageTitleBlock::getTitleBasedOnBaseRouteinto a new instance of\Drupal\Core\Controller\TitleResolverInterfacewhich we could call from multiple places. This way we could retrieve the section title both in\Drupal\Core\Block\Plugin\Block\PageTitleBlock, as well astemplate_preprocess_htmlfor the<title>element.Comment #17
kunal.sachdev commentedComment #18
lauriiiI discussed with @bnjmnm about the accessibility implications of this change. He recommended that we change the h1 for screenreader users pattern to:
[Section page title]: [Current page title]This works more consistently across the board, e.g. something like "Uninstall for Extend" isn't nice, but "Extend: Uninstall" works fairly well. This also makes the title map more closely with the UI, because we give more weight for the section title than the current title.
He also mentioned that the pattern for the document title looks fine on principle, but that he'd like to give it some more thought. 👍
I accidentally bumped into #996302: Pages of local actions don't display local action title as page title as I was doing research related to an another issue. This got me interested in how this worked in Drupal 7. 🤓 Turns out, Drupal 7 had the behavior that we were proposing originally in this issue. 🤯 I had to research the history behind that to double check how that decision was justified, just to understand if we have been missing something as we have been working on this.
Looks like the behavior changed as part of the massive menu system refactoring during the Drupal 8 development; essentially #2068471: Normalize Controller/View-listener behavior with a Page object introduced the new way of rendering pages which generated titles independent from the menu system. All uses of the old way was removed in #2194823: Ensure that all content/page routes have an _title which essentially finally changed the behavior to what we currently have.
I also discovered to a feature request that requested to enhance the document titles with the current local task in #111081: Output title of current local task in HEAD title (e.g., "People » List"), which is essentially what we are doing here. 🤩
I don't know how much usability consideration was given to this change. I didn't find any mentions of usability in these issues. At least it looks safe to say that it doesn't look like any of these changes were driven by the user experience.
Comment #19
catchWhen the original router patch was committed, there wasn't even thought given to the relationship between a router item, its access, and a menu link (see #1793520-7: Add access control mechanism for new router system downwards), and it took several people years, blocking Drupal 8's release, to repair some (but not all) of the damage done to the menu system. #2407505: [meta] Finalize the menu links (and other user-entered paths) system and sub-issues has some of the pain, and you can see that wasn't even opened until two years after the original router commit landed. So short version: none, but also worse than none.
Comment #20
rkollerre #16
First about the points under "What could we implement here?":
In regards of the separator I don't have a strong opinion. I've just tested the latest state of the MR with VoiceOver on the Mac. The only downside with separators is see for screenreader users is that
Manage fields | Article | Drupalturns intoManage fields vertical line article vertical line drupaleven if the default speech verbosity is set to low.vertical lineis a bit verbose and wordy. maybe pick another separator? if a separator is used for the h1 betweenManage fields | Articleit would make things consistent with the title as well. the separator would be visually hidden to sighted users anyway and for screenreader users it might be confusing otherwise if the title uses a separator while the h1 uses the wordforinstead?The problem of translations you've brought up in the context of the word
foris a relevant point - good catch. It would be interesting to make a brief ad-hoc survey in one of the translation related channels on the Drupal Slack and ask translators how easy or difficult a snippet likeManage fields for Article content typewould be to translate?As I've said I have no strong opinions in that regard neither for the use of a separator nor the use of the word
forinstead. but if i remember correctly, back when we've discussed the topic, either @benjifisher or @aaronmchale voted strongly for the usage of the wordforinstead of:(the separator we've planned to use back then). So i think it would be a good thing to bring them into the discussion. or better put this issue on one of the next ux meetings and restart the discussion around the topic (only next friday won't work because benji is away).In regards of making the title and the h1 more concise and clear I think getting some momentum back into #2521780: The 'Edit', 'Manage display' and 'Manage form display' tabs were hard to understand would be a good thing. We've discussed it during the UX meetings back then as well. The following Slack comment summarizes the outcomes. We were in line with the idea voted for in the issue to ideally make the tab labels one worded. It was mostly about removing the verbs
Manage. The suggestions from the issue and our discussions back then were:One suggestion for the decision process forward. It would be a good thing to discuss that aforementioned list and come up with a list of 4 to 5 different options for each tab everyone involved in the discussion would be comfortable with. then run a one-two punch survey for each tab label. the first question is a quantitive one about "the what" (a radio button list where the user is able to select the preferred term for example the options would be "view, display, view modes, other"). and an open ended question to get qualitative feedback. something like "tell us why you chose this answer. In case you chose "other" why would you use this word instead? Walk us through your thinking." That way the choice would be grounded in actual feedback and you could quickly get a feeling how comprehensible the choice of a one worded tab label would be. Because the folks involved in the issue already have an inherent bias.
re #18
I've tested the suggestion of @bnjmnm to use
:instead of|. The colon is the only separator which is not announced by any screenreader. Someone created a comparison in the context of gender inclusive language in mainly german (but the introduction and conclusion are in english and the comparison table is quickly translatable. but it is a good resource: https://taner-aydin.dev/a11y-up/genderinklusive-sprache-und-barrierefrei... ). So as I already said in my previous comment personally i would be fine with the suggestion of using the colon but i would include benji and aaron as well.about the current state of the MR - a few comments and suggestions.
[Section page title]: [Current page title]was suggested for the h1 in #18. I would strongly vote against that and use it the other way around:[Current page title] : [Section page title]. we've intentionally front-loaded the order to ease the scan and processabilitiy. the current page title is the most important piece of information then comes the section page title. and when the follow up issue gets in then the bundle name. (that bundle name follow up is essential otherwise it is impossible to determine which bundle type is in front of you. just based on the title and or h1 it is impossible right now)when the h1 is using the colon as the seperator now how about
[Current page title] : [Section page title] | [site title]for the title. that way you wouldnt have three separate pieces of information divided by the announcement ofvertical line. instead you havemanage fields article vertical line my drupal 9 site. that way things would be way more clear to screenreader users.for other sections of the admin interface i have to take a closer look and think about it. back then we were entirely focused on the scope for #2514218: [regression] Pages Manage Fields, Manage form, Manage display should include name of content type or entity. we already saw the need for other parts in the admin ui but havent had an in depth discussion yet.
Addendum: One detail I forgot to test. If you go to
/admin/structure/types/manage/article/display/fullyou currently have the following output:title:
Manage display | Article | My Drupal siteh1:
Article: Manage DisplayThe secondary nav context is missing from the title as well as the h1. One detail we forgot in our discussions back then as well. But i am uncertain if something like
Full content | Manage display | Article | My Drupal site. Have to think about that a bit more but just wanted to note that the secondary task nav has to be taken into consideration as well.Comment #21
rkollerTo get a feeling and an overview aside the bundle types from the postponed regression issue I quickly went through the admin pages and created a spreadsheet with all the titles, h1s, primary task labels, and secondary task labels based on the MR in this issue. i always prefer to have all the content in a spreadsheet next to each other. that way it is easier to assess the readability and consistency https://docs.google.com/spreadsheets/d/1XhQtXZA1JCwa8qnE3vp8gyW8HJT8zZxg...
Comment #22
ckrina@rkoller the spreadsheet doesn't have permissions to be viewed :)
Agreed. The point is that the existing value for page title is not correct: it was wrongly switched to the value of the tab as comment #18 and #19 pointed out. Here’s an screenshot of Drupal 7: you’re in the Article content type itself and we use tabs to navigate across the options available for it.
To note the
<title>here was Article | Site name.We load each tab in different pages because it was built like this, but tabs are a standard pattern where you separate content in different groups that are part of the same “piece”. Call it Merge Request, Settings or Content type, but you can see patterns of this everywhere. So this is what users expect (you can see it was perceived as an improvement in our recent tests in #3379160: Toolbar Prototype Usability Testing Phase I) and there is no need to repeat the value of the tab in the title: the rest of the UI elements give enough clues to understand the hierarchy. And another thing to add here, is that a solution like “Manage fields for Article content type” is worst for h1 than “Article”. It’s more verbose, but it results in worst scannability to quickly understand where you are in a first glance. For sighted users, a short and concise title is better if it’s combined with visual clues that help orientate/locate yourself. We’ve got already a complex UI and we should push to make it more clear, not more crowded if there is not a real need. I understand you also want to add the bundle, but that should be solved with UI elements (which we’re taking into account in #3076820: [META] Layout redesign) and not more text in the title. I can show a lot of examples, but we better discuss it in the follow-up and focus on the topic at hand here.
Here we go back to the same: what we call currently the page title is not conceptually correct for Manage display for example. What we’re calling here “section title” (Article) is what should be the page title (and what it was already). So agreed that the page title should be first element because it’s the most important piece of info, it’s just that the value we’re getting here is not correct. Here it should be Article: Manage fields.
About the
forvs:, as @lauriii saidfordoesn't tranalate well to other languages (AFAIK Finish is already an example) so is a strong enough reason already without the need to prove it with a survey. On top of that, patterns like "Update for Extend", "Extend: Update", "Update: Extend" make more sense with a colon even in English. It’s “agnostic” of the conceptual relationship between elements. So +1 to the “:” with the current info, subject to any new recommendation by @bnjmnm.Also, totally agree with getting to #2521780: The 'Edit', 'Manage display' and 'Manage form display' tabs were hard to understand again. Let’s discuss the changes for that in there and focus on the discussion here for the changes in the title :)
Comment #23
lauriiiThanks for creating the spreadsheet @rkoller! It makes reviewing the titles at scale much easier. IMO what's there currently makes sense for vast majority of the pages. There are few pages where we may want to adjust the titles, like the
/admin/structure/block-content/manage/basicsection,/admin/structure/media/manage/audiosection, and/admin/config/people/accountssection. None of those seem glaringly broken so leaving the adjustments to a follow-up would seem acceptable to me.I read the NN article on local navigation again to see if I could find examples that are relevant to the discussion around the screenreader
<h1>. The one pattern where this is being used consistently is car brochures. In that use case the pattern seems to be to start with the currently viewed mode in the beginning of the title, e.g. "Mazda 6 Image Gallery". They probably made additional considerations on top of accessibility, but it does make sense that it's not just an image gallery, but it's an image gallery for that specific model.Agreed that #2521780: The 'Edit', 'Manage display' and 'Manage form display' tabs were hard to understand is one of the key issues we should focus next from Field UI UX perspective. It has been already been tagged as Field UX meaning that at least I'm actively tracking it.
Comment #24
lauriiiComment #25
lauriiiComment #26
lauriiiComment #27
kunal.sachdev commentedComment #28
lauriiiThis was discussed in the UX meeting last Friday (#3381917: Drupal Usability Meeting 2023-08-25). During the call, there was clear consensus that:
This issue is for the first item, but we'll need a follow-up for the second item. Second item likely involves updating titles for individual pages because on many pages where there is second level local tasks, the actual page title matches with the first level local task.
There was also a recommendation that we further research the screenreader specific page titles. I reached out to few contacts that I have to see if I could find someone who could help. 🤞
I did try to see if there is any prior research on this. I found few articles that seemed to touch this topic. There's a Nielsen Norman article on headlines which recommends front-loading the page titles with the context.
It's the same pattern that is recommended for links, where you first explain which site you are linking to, and only then what is the heading of that article. It's also the same experience with person viewing the page visually; the section title is displayed first, and has more visual weight.
All of the articles linked on this issue make it clear how prudent context is for good user experience, and highlight how bad the current experience is. I hope that we can come to some conclusion on which approach to go with, at least until we know better, because it seems clear (at least to me) that this is a net win, regardless of whether we have the context before or after the current page title.
Comment #29
joachim commented> This works more consistently across the board, e.g. something like "Uninstall for Extend" isn't nice, but "Extend: Uninstall" works fairly well. This
True, but having 'Edit display for Article' would be *really nice*.
At the risk of derailing and adding complexity, what if there were a way to vary how the local page title & the tab parent title are combined?
Off the top of my head, could we pass the tab parent title in to the page title callback as a parameter, and let the callback decide how to combine them?
This could be done in a follow-up -- the perfect is the enemy of the good :)
Comment #30
ckrinaAgreed! I understand wanting to nail the page title, but I'd recommend arriving to a minimum agreement with something not bad and refine it later in a follow-up, and land the h1 changes soon because it's a big UX improvement for sighted users.
I'd personally go with the pattern that results in the following structures because it avoids assuming an specific combination of order and connectors (from English):
(Again, thanks @rkoller for the spreadsheet, it's super useful)
Comment #31
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #32
lauriiiI slightly changed how the title is decided, which allows overriding titles for individual pages by using a
#titlerender array item within a controller (similar to what we currently have). This is needed for some routes like entity delete, where the page title is overridden to "Are you sure you want to delete ...". We may need additional APIs to fully address #29 but as mentioned in that comment, this could be done in a follow-up.Coincidentally, I was testing out Airtable and noticed that they are implementing the
[Section title]: [Current title]format in their page titles. The demo they ship with is a product catalog. In that example, the page titles areProduct Catalog: Furnitures,Product Catalog: Vendors, and so on. I'm starting to think that we should move forward with the current proposal and revisit the formatting, and the potential additional APIs to alter that behavior in a follow-up.Comment #33
kunal.sachdev commentedComment #34
kunal.sachdev commentedComment #35
smustgrave commentedPostponed https://www.drupal.org/project/drupal/issues/2938129 on this one.
Comment #36
tim.plunkettWork can continue in the MR, but for the short term here is a snapshot of the changes backported to 10.1.x
Comment #37
kunal.sachdev commentedWill work on remaining things like change record, release note, clean-up etc.
Comment #39
kunal.sachdev commentedCreated change record https://www.drupal.org/node/3386683
Comment #40
kunal.sachdev commentedComment #41
kunal.sachdev commentedCreated follow-ups #3386724: Change the separator in document title and #3386732: Refine the page title if possible.
Comment #42
kunal.sachdev commentedComment #43
kunal.sachdev commentedAdded release note
Comment #44
kunal.sachdev commentedComment #45
kunal.sachdev commentedComment #46
hooroomooLooks like all feedback has been addressed and works as expected. MR looked good to me. Followups have also been created to revisit the formatting if need be but this is already a big UX improvement. Also checked how the titles read on VoiceOver.
Comment #47
smustgrave commentedWoo this is huge improvement! Congrats everyone!
Comment #48
duadua commentedTesting this as Drupalcon today. I'm trying to understand the reasoning behind this change, and talked with lauriii about this. We added one more sentence to the change record to help existing sites/themes to make a decision.
I clicked through some example pages:
- /admin
- /admin/content (On this one 'Content' appears multiple times, but that seems correct, given that admin/content/overview is the default tab.
- /admin/modules
- ...
It is an interesting aspect that this moves the responsibility from the developer towards the site builder/theme, the layer that actually knows what sensible. From my experience this makes the most sense.
While reading the code I had two minor nitpicks
Comment #49
lauriiiAdded minor feedback in the MR
Comment #50
kunal.sachdev commentedComment #51
smustgrave commentedFYI gitlab and drupalCi seem happy but when I did a diff of the MR to apply locally I got
Probably nothing but wanted to note.
Applied the MR and cleared cache several times but when I go to a manage display for any entity type it still just says "Manage Display" nothing changed from before.
If that's no longer the goal or it's something different could the issue summary be updated please
Thanks!!
Comment #52
lauriii@smustgrave Thanks for the review! Did you run update hooks after applying the patch? The title change requires a config change which we're doing automatically for Claro in an update hook.
The error is probably caused by the changes to binary files. 🤔
Comment #53
lauriiiI posted one comment on the MR so moving back to NW for that.
Comment #54
smustgrave commentedDidn't realize it needed an update.
That did solve the issue but am noticing some differences based on entity type
If I go to manage display for the Basic block I get title "Edit Basic block"
If I go to manage display for the Article content type I get title "Article"
Comment #55
lauriii@smustgrave Those are caused by title overrides. We'll probably want to remove most of them, but we need to take a holistic look at it. I opened a follow-up to do this: #3396977: Review page titles for consistency since it could end up being quite a lot for single issue.
Comment #56
kunal.sachdev commentedComment #57
smustgrave commentedThanks for pointing out that follow up @lauriii.
Believe @kunal.sachdev has addressed the feedback.
Comment #60
tim.plunkettAs this is targeting 10.3 and won't be backported to 10.2, here's a patch for 10.2
Comment #61
larowlanHiding patches because there's an MR
Updating issue credits
Comment #62
larowlanLeft a review, this is looking really good and is a great improvement - still a fair bit to do though - thanks!
Comment #63
larowlanI tested this manually on secondary local tasks, e.g. on 'teaser' under 'manage display'
For all the secondary tasks it will show something like this:
<h1 class="page-title">Article<span class="visually-hidden">: Manage display</span></h1>I was expecting it might show the context of the view mode (e.g. Teaser)
But I checked what happens in HEAD and it shows
Manage displayso there's a definite improvement.@lauriii mentioned he was working to improve things further and that would definitely be a nice thing to do in a future issue (follow up).
Comment #64
kunal.sachdev commentedPostponed on #3376566: Display the page title, even if "0" in olivero and #3412316: Use 'search.view' instead of 'search.plugins:' . $default for base route in SearchLocalTask::getDerivativeDefinitions() to keep the scope of this issue small.
Comment #65
kunal.sachdev commentedAll tests are passing now and I think there is no need to postpone this issue anymore.
Comment #66
smustgrave commentedLeft some small comments.
Comment #67
kunal.sachdev commentedComment #68
omkar.podey commentedAll the feedback was addressed @larowlan if you want to do a second pass until then RTBC'ed
Comment #69
omkar.podey commentedComment #70
omkar.podey commentedComment #71
quietone commentedNeeds a rebase.
Comment #72
lauriiiI discussed with @alexpott about the failing test. The performance test is failing because this is introducing an additional cache query. We discussed about potentially adding static caching but agreed that the additional cache query was fine. So basically what we could do, is bump up the query counts by one.
Comment #73
kunal.sachdev commentedComment #74
lauriiiThe rebase seems good. 👍 Thank you @kunal.sachdev!
Comment #75
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #76
kunal.sachdev commentedComment #78
alexpottAdded some review comments to the MR. I think is we apply the change to the HTML title only to admin routes tests will fail... so it'll need some work.
Comment #79
aaronmchaleI'm not sure, but this issue might be slightly related here #3344200: PathBasedBreadcrumbBuilder needs to be able to exclude pointless paths.
One thing I see here is that if the page title is consistent across all local tasks, then the barodcrumb probably doesn't need to contain the primary local task. For example, when on the "Manage fields" tab of the Article content type, "Article" appears in the breadcrumb, but it probably doesn't need to be there because it simply goes back to the "Edit" tab.
Comment #80
aaronmchaleComment #81
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #83
sakthi_dev commentedRebased with latest changes.
Comment #84
kunal.sachdev commentedComment #85
omkar.podey commentedThe latest changes look good, @alexpott if you can approve this too that would be great.
Comment #86
alexpottCommitted and pushed ad606a8fb7 to 11.x and 6e6f391806 to 10.3.x. Thanks!
Comment #89
alexpottTagging to big this up in the release.
Comment #90
smustgrave commentedCongrats on this one!
Comment #91
ressaThanks! It looks like an image is missing after "Users can change their page title configuration ..." in the Change Record.
Comment #98
larowlanWe were trying to reproduce a bug at Drupal South 2024 #2895531: Cannot uninstall Content Moderation and found that this issue has caused a fatal error for all entity-types when using PrepareModulesEntityUninstallForm
I discussed this with @quietone at Drupal South and we agreed because this has only been in core for 10 days and it has introduced a new fatal error that makes it impossible to uninstall any module that has entity-types - we decided to revert it.
Steps to reproduce the bug
I'm adding credit for @yiySHAO, @dscl, @ameymudras and @samundrasharma who worked with me.
Comment #99
larowlanI've unpublished the three change notices.
Please add back the
10.3.0 release notesand10.3.0 release highlightstags when this goes back in.Comment #100
alexpottSo this is happening because the route definition
has a bug.
\Drupal\system\Form\PrepareModulesEntityUninstallForm::formTitledoes not exist. The title for this page is set by$form['#title'] = $this->getQuestion();in\Drupal\Core\Entity\ContentEntityConfirmFormBase::buildForm- this take precedence. But now with title logic in \Drupal\Core\Block\Plugin\Block\PageTitleBlock::getTitleBasedOnBaseRoute() we are finally try to call the bogus callback.The correct fix is to remove the bogus callback... but what should we do if contrib / custom has the same problem? Do we baby sit the broken code by doing something like:
in
\Drupal\Core\Block\Plugin\Block\PageTitleBlock::getTitleBasedOnBaseRoutebut this feels kinda wrong. Not sure about the best way to proceed.Comment #101
dscl commentedThere is an open issue for fixing the missing _title_callback: #2862702: PrepareModulesEntityUninstallForm::formTitle does not exist
@larowlan, @xjm and I have discussed it here at DrupalSouth 2024 just now, and we will be working on that issue to get it fixed.
And as consequence we agree to mark this as postponed.
Comment #102
dscl commentedComment #103
dscl commentedI believe we still need to fix #2862702: PrepareModulesEntityUninstallForm::formTitle does not exist so we have the expected behaviour for a form that is part of core, but something like the baby sitting mentioned on #100 would still be necessary to ensure other modules wouldn't fall into the same problem.
I would say is needs to live inside
\Drupal\Core\Controller\BaseRouteTitleResolver:getTitle, and this addition would be contextually fine to be part of this issue.I agree it is kind of ugly and there may be a better way to throw some sort of warning to the logs and not a fatal error.
Then, thinking again, if the try/catch gets added here this issue may not depend on the other being fixed and could be back on track to be committed.
Comment #104
alexpottHiding all the patches. I think given what we found with core we need to put something like the code babysitting discussed in #100 so this does not need to be postponed on #2862702: PrepareModulesEntityUninstallForm::formTitle does not exist
Comment #105
alexpott@dscl the exception is coming from the call to the regular title resolver in \Drupal\Core\Block\Plugin\Block\PageTitleBlock::getTitleBasedOnBaseRoute() - it's not the base route title resolver. So the fix needs to go there and not in BaseRouteTitleResolver.
I've implement the fix and tested manually. Things I'm not sure about... should we log this? Should we add test coverage - adding a broken title resolver feels funny.
Comment #106
alexpottDiscussed with @catch and @longwave about whether we should put in defensive coding around broken routes and we concluded that letting Drupal error was better than either:
Comment #107
alexpottComment #108
ckrinaThis look great! Thanks for working on this and improving the UX.
Comment #109
alexpott@longwave pointed out the adding RequestGenerator to the Utility namespace is not great. Moved to the Routing namespace as this already has:
So it not that surprising to find this there.
Comment #110
longwaveAdded some minor feedback.
Comment #111
alexpottI've addressed @longwave's feedback - as it was all nits setting back to rtbc.
Comment #112
longwaveI think this is almost ready to commit but we need to decide which branches this goes in given it has an update path (and change the deprecation messages to match).
Comment #113
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #114
joachim commentedI really like this change, but I'm not sure about it being yet another setting. Our admin UI can be opinionated!
And I don't understand the bit about before/after local tasks.
Comment #115
_pratik_Rerolled Patch for 10.2.10
Comment #116
xjmAdding credits for in-person discussions.