equinor / energyvision

Home of the equinor.com website
https://www.equinor.com
MIT License
34 stars 8 forks source link

Crude oil assay news articles return 404 in archive #1047

Closed SvSven closed 2 years ago

SvSven commented 2 years ago

The URL used to fetch the content for crude oil assay articles in the news archive is incorrect - it is trying to fetch the content with archive in the URL, while it should exclude that.

/en/news/archive/crudeoilassays/crude-oil-assay-update-16-03-22

Reason for this could be that crude oil assays are in a folder named crudeoilassays inside the news archive

SvSven commented 2 years ago

This is ready to be reviewed @wenche @fernandolucchesi @padms

The 404's were being caused by the logic that handles archived archive news (news that already had archive in the URL in AEM). I have updated the logic that handles it (and made it more functional, which should make @nilsml happy) to account for the crudeoilassay URLs.

This link now no longer is a 404: https://web-global-development-energyvision-dev.radix.equinor.com/news/archive/crudeoilassays/crude-oil-assay-update-16-03-22

This is a "normal" archived AEM news article which still works: https://web-global-development-energyvision-dev.radix.equinor.com/news/archive/20220406-naturgy-explore-offshore-wind-development-spain

And this is an article from 1998 which should have the /archive/ in the URL from AEM, which also still works: https://web-global-development-energyvision-dev.radix.equinor.com/en/news/archive/1998/12/15/NewRouteForAzeriOil

wenche commented 2 years ago

Doesn't look too good with crudeoilassays special logic, but whatever floats our boat :sweat_smile:

SvSven commented 2 years ago

Yeah having it hard-coded like that is not particularly nice, but not sure how else to incorporate it into this, since we can't just do a redirect.

fernandolucchesi commented 2 years ago

I love how the link now works, and all it has is a new link to a 404 page. Should we have redirects for these or we don't care about archived content links? @meols

fernandolucchesi commented 2 years ago

@meols to add a redirect from "en/what-we-do/crude-oil-and-condensate-assays" to the new crude oil page

meols commented 2 years ago

@fernandolucchesi - the redirect is set up