guardian / dotcom-rendering

The Guardian web rendering service (aka DCR/DCAR)
https://www.theguardian.com
Apache License 2.0
255 stars 30 forks source link

Subnav missing from articles with tag `us-news/us-politics tag` #11005

Open arelra opened 8 months ago

arelra commented 8 months ago

The subnav is missing for some articles as flagged in this PR which regenerated the DCR fixtures: https://github.com/guardian/dotcom-rendering/pull/10864

Screenshot 2024-03-24 at 13 40 48

Some affected articles: https://www.theguardian.com/us-news/2024/mar/23/us-senate-passes-spending-package-avoid-government-shutdown https://www.theguardian.com/us-news/2024/mar/24/lincoln-historians-us-elections-trump-biden-symposium-inskeep https://www.theguardian.com/world/2013/jun/06/nsa-phone-records-verizon-court-order

On investigation the subnav is missing for articles with the tag of us-news/us-politics which was removed as a nav link as part of this PR: https://github.com/guardian/frontend/pull/26840

The Frontend nav logic attempts to match the article tag keyword ids to an existing NavLink or a parent NavLink but this fails for us-news/us-politics:

https://github.com/guardian/frontend/blob/e2aff260d4e5713ce15864833218a8cb6ddda9ca/common/app/navigation/Navigation.scala#L80-L96

This might be a known result of removing keyword values from the nav menus.

If we implement a fix we should regenerate the DCR fixtures to snapshot the subnav again.

arelra commented 8 months ago

Is it possible to fallback to a parent section of the tag i.e. us-news ?

arelra commented 6 months ago

Previously flagged: https://github.com/guardian/dotcom-rendering/issues/10447