Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task
Tracked by #18298
FranECross opened this issue May 23, 2024 · 28 comments
Assignees
Labels
Drupal engineering CMS team practice area Public Websites Scrum team in the Sitewide crew sitewide Sprint 6

Comments

@FranECross
Copy link

FranECross commented May 23, 2024

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

@FranECross FranECross added Drupal engineering CMS team practice area Needs refining Issue status Public Websites Scrum team in the Sitewide crew Sprint 5 labels May 23, 2024
@FranECross FranECross changed the title [BUG] [Breadcrumbs] [BUG] [Breadcrumbs] For two of the disability benefits pages, the breadcrumb for 'how to file a claim' is displaying in Spanish. May 23, 2024
@megzehn
Copy link

megzehn commented May 31, 2024

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
Copy link
Author

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 FranECross changed the title [BUG] [Breadcrumbs] For two of the disability benefits pages, the breadcrumb for 'how to file a claim' is displaying in Spanish. [BUG] [Breadcrumbs] One disability benefits page is displaying the breadcrumb for 'how to file a claim' is displaying in Spanish. May 31, 2024
@FranECross FranECross changed the title [BUG] [Breadcrumbs] One disability benefits page is displaying the breadcrumb for 'how to file a claim' is displaying in Spanish. [BUG] [Breadcrumbs] One disability benefits page is displaying the breadcrumb for 'how to file a claim' is displaying in Spanish when viewing in English May 31, 2024
@FranECross
Copy link
Author

@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
Copy link

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 FranECross changed the title [BUG] [Breadcrumbs] One disability benefits page is displaying the breadcrumb for 'how to file a claim' is displaying in Spanish when viewing in English [BUG] [Breadcrumbs] The disability benefits page is displaying the breadcrumb for 'how to file a claim' in Spanish when viewing in English Jun 4, 2024
@FranECross
Copy link
Author

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

@FranECross FranECross removed the Needs refining Issue status label Jun 4, 2024
@kristinoletmuskat
Copy link

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

@megzehn
Copy link

megzehn commented Jun 5, 2024

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
Copy link
Contributor

dsasser commented Jun 17, 2024

@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
Copy link

megzehn commented Jun 18, 2024

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
Copy link
Author

@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
Copy link

ian-sears commented Jun 18, 2024

@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
Copy link

megzehn commented Jun 18, 2024

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?

@dsasser
Copy link
Contributor

dsasser commented Jun 18, 2024

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
Copy link

megzehn commented Jun 18, 2024

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
Copy link
Collaborator

RLHecht commented Jun 18, 2024

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
Copy link
Contributor

dsasser commented Jun 18, 2024

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 dsasser changed the title [BUG] [Breadcrumbs] The disability benefits page is displaying the breadcrumb for 'how to file a claim' in Spanish when viewing in English [Discovery] [Breadcrumbs] The disability benefits page is missing a level in the breadcrumb for 'how to file a claim' Jun 18, 2024
@dsasser dsasser changed the title [Discovery] [Breadcrumbs] The disability benefits page is missing a level in the breadcrumb for 'how to file a claim' [Breadcrumbs] The disability benefits page is missing a level in the breadcrumb for 'how to file a claim' Jun 18, 2024
@dsasser
Copy link
Contributor

dsasser commented Jun 24, 2024

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
Copy link

megzehn commented Jun 26, 2024

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

@dsasser
Copy link
Contributor

dsasser commented Jun 27, 2024

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

@FranECross
Copy link
Author

@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

@dsasser dsasser removed their assignment Jul 2, 2024
@megzehn
Copy link

megzehn commented Jul 8, 2024

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
Copy link

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
Copy link
Contributor

jilladams commented Jul 8, 2024

@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
Copy link
Contributor

dsasser commented Jul 9, 2024

@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
Copy link
Contributor

dsasser commented Jul 9, 2024

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
Copy link

megzehn commented Jul 9, 2024

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

@jilladams
Copy link
Contributor

Ok, final summation:

  • If a page is in a menu, the menu will impact the breadcrumb.
    • Drupal will use the first occurrence of the page in the menu to build the breadcrumb, irrespective (?) of page's path.
  • If a page is NOT in a menu, the path will determine the breadcrumb.
  • We are not going to try to fix this right now to handle for 1 page with 2 menu links.
  • We ARE going to update the CMS content model documentation about breadcrumbs to reflect the findings. I have a draft, but SOCKS is down, so will save those changes later today.
  • Ultimately breadcrumb logic from Drupal belongs to the CMS team. (cc @gracekretschmer-metrostar @EWashb )
    • But: Sitewide may be able to help contribute a bigger picture holistic handling for breadcrumbs irrespective of menu occurrences when we build Benefits Hubs 2.0, through the Collab Cycle process.

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

@jilladams
Copy link
Contributor

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:

  • Easy Breadcrumb for content types without breadcrumb data coming from menu_breadcrumb, Easy Breadcrumb generates breadcrumbs based on path.
  • Computed Breadcrumb doesn't have any configurable settings, but it takes the breadcrumbs generated for any node (whether easy breadcrumb or menu-managed) and shoves them into a hidden field. That field data is what shows up in JSON:API

Other links

PR where Easy Breadcrumb and Computed Breadcrumb were added to CMS
PR added to content-build
Easy breadcrumb settings in CMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drupal engineering CMS team practice area Public Websites Scrum team in the Sitewide crew sitewide Sprint 6
Projects
None yet
Development

No branches or pull requests

8 participants