Closed blnkt closed 2 years ago
Hey @blnkt , it looks like this one is an API issue. To get the links to work, "News" needs to be set as a root page in craft: https://rubin-obs-api-int-2eici5myiq-uc.a.run.app/admin/globals/default/rootPageInformation The front-end is looking for "News" in that list of root pages, and then getting the news uri from that data.
Where the news page is getting breadcrumb data: https://github.com/lsst-epo/rubin-obs-client/blob/master/components/templates/NewsPage/index.js#L45
The useCustomBreadcrumbs
function, which looks for root pages:
https://github.com/lsst-epo/rubin-obs-client/blob/master/lib/utils.js#L87-L93
There's a few places in the code where this hook is looking for root values, and they're not defined in Craft either:
Is there any reason not to add these pages to the global root page information?
No that sounds like a fine solution, makes sense now that you've explained it. I think that functionality was never very clear to us so our Content Editors probably just didn't know to make the change in that Globals section. I'll give it a go and watch the magic happen. And if it works as you say I'll close this issue.
works just as you say. Thank you much.
Expected Behavior
Tag should link to news search results page with same results as you would find if you manually searched the tag term in the sort/filter/search bar.
Actual Behavior
404 page not found.
Steps to Reproduce the Problem
neutron star
linkhttps://staging.rubinobs.org/undefined?search=neutron-star
(note undefined value)For comparison:
neutron star
https://staging.rubinobs.org/news?search=neutron+star