owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.39k stars 229 forks source link

Grapher redirects aren't working #3958

Closed ikesau closed 1 month ago

ikesau commented 1 month ago

Problem

Grapher redirects are not working, and instead serving 404 pages.

Expected behaviour

They should redirect you to the desired different slug.

Example

https://ourworldindata.org/grapher/incidence-of-child-labour-in-the-united-states-1890-1930 should redirect to https://ourworldindata.org/grapher/incidence-of-child-labor-in-the-united-states-1890-1930 but it's not working.

image

Technical notes

ikesau commented 1 month ago

A possible candidate might be this change to how we handled 404s in the Grapher worker. https://github.com/owid/owid-grapher/pull/3951/files

ikesau commented 1 month ago

Confirmed that https://github.com/owid/owid-grapher/commit/be9c4e31d1be2b44e1326eec94605d28adf4b16e is the culprit, as https://f5a632ba.owid.pages.dev/ is the deploy where redirects stop working.

ikesau commented 1 month ago

Confirmed fixed by #3959

https://ourworldindata.org/grapher/incidence-of-child-labour-in-the-united-states-1890-1930 is redirecting correctly