department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

[Breadcrumbs] The disability benefits page is missing a level in the breadcrumb for 'how to file a claim' #18204

Closed FranECross closed 2 months ago

FranECross commented 4 months ago

Description

The breadcrumb of this page is missing the third level level. It should read as this:

Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim

Background

When we brought this issue to the CMS team initially, they made an adjustment that added the correct level, but it was appearing in Spanish.

We need the third level of the breadcrumb to appear in English (How to file a VA disability claim), and we're not sure how to do that in Drupal.

Steps to Reproduce

  1. Go to this URL https://www.va.gov/disability/how-to-file-claim/additional-forms
  2. Note that the breadcrumb is missing 'How to file a VA disability claim'

Engineering notes / background

Analytics considerations

Quality / testing notes

Acceptance criteria

megzehn commented 4 months ago

Thanks for filing this, @FranECross ! Just a quick note to clarify that it's only one page (that I'm aware of) that's incorrectly displaying a Spanish breadcrumb:

https://www.va.gov/disability/how-to-file-claim/additional-forms/

The correct breadcrumb should be:

Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim

Let us know if there's anything we can do to fix this.

CC @jennymayoco and @kristinoletmuskat

FranECross commented 4 months ago

Thank you, @megzehn ! I'll update the ticket. We hoped to get it into Sprint 5, but am not sure if we'll be able to address it in that sprint. I'll ask the engineer to estimate it and will have it at the top of our stretch column to pull in if he's able to. If not, then Sprint 6 for sure. cc @jilladams

FranECross commented 4 months ago

@dsasser When you can, will you please async refine/estimate this ticket, and I'll put it at the top of the Stretch/Next Sprint column to be pulled in if you're able to toward the end of the sprint, and if not, then we'll get it into Sprint 6. Thanks in advance!

jennymayoco commented 4 months ago

hi @FranECross! I wanted to flag that the additional forms page was previously under "manage benefits" in the disability hub. We would like for it to show in both places. We think that might have been why there was an initial breadcrumb issue since the page links from two place in left nav.

Mange left nav

cc @megzehn

FranECross commented 4 months ago

We think this is an issue with placement of a node in a menu and would be a content change.

kristinoletmuskat commented 4 months ago

@megzehn do you want to mess around with this node in drupal and see if we can get it to work?

megzehn commented 4 months ago

Hi @kristinoletmuskat, @jennymayoco, and @FranECross,

I fixed the missing instance in the menu, but we still have an incorrect breadcrumb. The breadcrumb of this page should read as this:

Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim

When we brought this issue to the CMS team initially, they made an adjustment that added the correct level, but it was appearing in Spanish.

We need the third level of the breadcrumb to appear in English (How to file a VA disability claim), and I'm not sure how to do that in Drupal.

Let me know if you have any suggestions. Thanks!

CCing @RLHecht and @ian-sears for visibility!

dsasser commented 3 months ago

@FranECross the issue description doesn't match the current behavior on prod (I cannot reproduce the Spanish breadcrumb). Seems like a content change may have solved this. Is this a no-op on my end, then?

megzehn commented 3 months ago

Hi @FranECross, I think maybe we need to update the description in this ticket to match the current issue:

The breadcrumb of this page is missing the third level level. It should read as this:

Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim

When we brought this issue to the CMS team initially, they made an adjustment that added the correct level, but it was appearing in Spanish.

We need the third level of the breadcrumb to appear in English (How to file a VA disability claim), and we're not sure how to do that in Drupal.

@TroyCMSSupport , are you able to add any context around how the CMS team added the third level in the hierarchy, which displayed in Spanish? (CMS ticket for reference: https://dsva.slack.com/archives/CDHBKAL9W/p1715187186567019 )

FranECross commented 3 months ago

@dsasser I'll update the ticket to match what the current issue is (explained by Megan in the comment above), and will await Troy's answer on why that part of the breadcrumb no longer displays. cc @megzehn

ian-sears commented 3 months ago

@FranECross @megzehn @TroyCMSSupport The answer lies in the hierarchy of the "menu system". This page currently sits (in the menu system, not necessarilly the "path" or url...) under the parent menu called ""Manage Benefits". I am right now looking "up" at the "How to file a Claim" in the Menu system to see if there is a straightfdorward way to move the menu (and the breadcrumbs will then reflect what you are after here).

--EDIT-- Peek in here and you will see what I mean https://prod.cms.va.gov/admin/structure/menu/manage/disability-benefits-hub There are a couple of pages with this same title... and this illuminates the issues trying to solve with Spanish versions, etc, as well.

megzehn commented 3 months ago

Hi @ian-sears, one other note, the IA team wants to keep the page in the 2 different places in the left nav.

Can we leave it in both places and also have the breadcrumb match the URL correctly?

dsasser commented 3 months ago

Hi @ian-sears, one other note, the IA team wants to keep the page in the 2 different places in the left nav.

  • Under "Get benefits" --> "How to file a claim"
  • Under "Mange benefits"

Can we leave it in both places and also have the breadcrumb match the URL correctly?

We can have it in both places, but there can only be one breadcrumb for a given page. Currently, the system is pulling the breadcrumb from the 'Manage benefits' location in the Disability menu, since it has a higher "weight".

Screenshot 2024-06-18 at 10 07 06 AM Screenshot 2024-06-18 at 10 06 50 AM

^ here you can see that the page under 'Manage Benefits' has a weight of -68 which is higher than the same page in the 'Get Benefits' section with weights of -90 and -91 for the English and Spanish pages respectively.

The only way I know of to achieve what you are after is to create a duplicate page, placing one in Manage Benefits and the other in Get Benefits. Creating a duplicate page does have problems, such as SEO and maintenance concerns, so I wouldn't necessarily say that we should be doing that, but that it is a technical approach that could work should we need.

megzehn commented 3 months ago

Ah, interesting @dsasser. Just to clarify, we're not trying to have 2 different breadcrumbs -- just 1 that matches the URL (regardless of the user path).

I'm not totally clear on what the weights mean or what it means to change that. But if it's not an easy fix, then I think we need to leave this alone. I agree that we don't want 2 duplicate pages.

RLHecht commented 3 months ago

Not sure if this is helpful (or maybe this is a different situation), but we do have other examples of pages that lie in two different areas of the site. You might be able to see how they're set up if it's helpful:

These 2 pages are in the left nav in both Education and Careers and Employment:

dsasser commented 3 months ago

Ah, interesting @dsasser. Just to clarify, we're not trying to have 2 different breadcrumbs -- just 1 that matches the URL (regardless of the user path).

Just so I'm clear: you want the breadcrumb to always be 'Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim' even if the user clicks the 'File additional forms...' link from the 'Manage Benefits' menu? If so, we would have to look into re-arranging some of the Drupal menu items in a way that doesn't impact the entire menu tree.

I'm not totally clear on what the weights mean or what it means to change that.

My apologies, I meant to clarify that. When Drupal is building a breadcrumb for a page, it checks the menu for an occurrence of that page. If there are multiple occurrences (such as in the case I described), it uses the item with the lowest weight to form the breadcrumb.

dsasser commented 3 months ago

Update 6/24/24

Spanish breadcrumb has been resolved, so I removed the sprint priority/high priority status after discussing with Fran.

Since this issue pivoted from the spanish breadcrumb to a missing breadcrumb, the challenge has been in finding the reason for the missing breadcrumb.

Reminder that the breadcrumb should display as 'Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim' but How to file a VA disability claim is missing.

The reason for this comes down to how Drupal builds a breadcrumb for a page. Drupal core, along with several contributed modules, are involved. Things that can impact a breadcrumb are the page path, menu, taxonomies, and more.

The page in question is linked in two places in the same menu, and Drupal is returning the breadcrumb for one link vs another. In this case, the link in the 'Manage Benefits' section, rather than the link in the 'Get benefits' section. Drupal is unaware that the breadcrumb should be built for link 2, and there is no current way to tell Drupal to do that.

To provide a solution to the problem, I tested re-ordering the menu such that Drupal would see the 2nd link as a base for the breadcrumb, but it did not work as expected.

After some discovery, I noted that when disabling the 'menu_breadcrumb' module, the solution I tried started working per my original expectations. So it seems there is some behavior being added or modified in menu_breadcrumb that is causing the core behavior to change in such a way as to have this outcome.

At this stage I'm looking into how to use/modify menu_breadcrumb to achieve what we are after.

megzehn commented 3 months ago

Thank you so much @dsasser for the update and explanation! CC @jennymayoco and @kristinoletmuskat for awareness

dsasser commented 3 months ago

Per our discussion yesterday @FranECross will be working with @megzehn et al to determine a path forward.

FranECross commented 3 months ago

@megzehn As Daniel's research indicates, in order to change the current breadcrumb behavior (in regards to when a page lives in two different locations) we would need to duplicate the page, leading to more duplicative updates, tracking, etc., or request that the CMS team take on a large endeavor to change how breadcrumbs behave across the entire ecosystem (not sure when they could get it on their roadmap).

We (Michelle Middaugh/Jill Adams/Dave Conlon and I) chatted about this today, and would like to suggest that we instead wait until one of the Sitewide teams takin on the Benefits 2.0 initiative, and have breadcrumbs be one of the requirements (displaying appropriately regardless of how many places the page displays/lives.

Please let us know if you/others are onboard with this suggestion? Thanks in advance for your consideration! cc @mmiddaugh @dsasser @jilladams

megzehn commented 2 months ago

Hi @FranECross, I'll let @kristinoletmuskat weigh in, but I suspect this is fine.

I just want to clarify again though that we're not looking for 2 different breadcrumbs, or 2 duplicate pages. We just want the breadcrumb to match the URL.

kristinoletmuskat commented 2 months ago

Ya, it seems like Dan tried reordering the pages in the menu to try to pull the breadcrumb from the first page, and it didn't work. This isn't a huge issue, just a minor standards thing, so I am ok with pursuing that for the future!

jilladams commented 2 months ago

@dsasser the other breadcrumb issue you had noticed (where OCTO appeared in crumbs) got resolved on Fri. We fixed it by cloning that original node, and the cloned node didn't have the same problem. FYI.

Before I realized this was a different sort of issue, I did try cloning https://prod.cms.va.gov/disability/how-to-file-claim/additional-forms (node 906) to see what would happen from a fresh start. That clone is here as draft, in case useful to look at. This probably just further confuses things / doesn't solve anything, but figured I'd share just in case:

Desired crumb: Home > Disability benefits > How to file a VA disability claim > File additional forms for your disability claim

Node 906: Home > Disability benefits > Manage benefits > File additional forms for your disability claim

Node 70472 (clone): Home > VA disability compensation > How to file a VA disability claim > File additional forms for your disability claim

So it's still wrong (crumb 2), but in a different way.

dsasser commented 2 months ago

@dsasser the other breadcrumb issue you had noticed (where OCTO appeared in crumbs) got resolved on Fri. We fixed it by cloning that original node, and the cloned node didn't have the same problem. FYI.

I did try cloning https://prod.cms.va.gov/disability/how-to-file-claim/additional-forms (node 906) .... So it's still wrong (crumb 2), but in a different way.

Cloning any node and getting a different breadcrumb is what I would expect to happen.

dsasser commented 2 months ago

Hi @FranECross, I'll let @kristinoletmuskat weigh in, but I suspect this is fine.

I just want to clarify again though that we're not looking for 2 different breadcrumbs, or 2 duplicate pages. We just want the breadcrumb to match the URL.

That is correct. What we identified is that if a page is in a Drupal menu, Drupal will build the breadcrumb from the placement/hierarchy of page in the menu. However, If that same page is in that same menu a second time, and since Drupal can't create two breadcrumbs, it will use the first one as ordered by 'weight' in the menu. The way Drupal's breadcrumb system works, this means that the path-based breadcrumbs aren't currently being considered. If the node was not in a menu, then the path-based breadcrumb would come into play. I hope that makes sense!

megzehn commented 2 months ago

Ahh that's interesting. Thank you all for explaining the steps you took to fix these breadcrumb issues. This is all very helpful!

jilladams commented 2 months ago

Ok, final summation:

Closing. If i missed open items here that still need to be addressed, feel free to reopen.

jilladams commented 2 months ago

Updated: https://prod.cms.va.gov/admin/structure/cm_document/note/126/breadcrumbs

Updated 7/2024

Breadcrumb is built based on many factors, including the page path, inclusion in menus, relevant taxonomies, and potentially other variables.

Nodes that are included in a menu

The logic for this comes from both Drupal core and logic in the 'menu_breadcrumb' module, where menu_breadcrumb has breadcrumb configuration per content type.

If a page is in a Drupal menu, Drupal will build the breadcrumb from the placement/hierarchy of page in the menu.

If a page appears twice in the same menu (sometimes required for content purposes), Drupal will use the first menu item in the menu, as ordered by 'weight', to generate the breadcrumb. Drupal cannot / does not generate 2 separate breadcrumbs for the same node, if it is entered in a menu twice. The way Drupal's breadcrumb system works, this means that path-based breadcrumbs aren't currently being considered for nodes in menus.

For nodes that are not in any menu

For nodes in no menu, the settings in menu_breadcrumb do not generate a breadcrumb, because: no menu. So for nodes in no menu, breadcrumbs are handled via a Drupal module, Easy Breadcrumb, which makes breadcrumbs available in the JSON:API.

Two modules in the CMS drive this breadcrumb behavior: