CorrelAid / correlaid_website

Source code for the CorrelAid website
https://correlaid.org
3 stars 0 forks source link

Custom error pages #23

Closed jstet closed 11 months ago

friep commented 12 months ago

new issue: website crashes if person (e.g. content creator) has no image (which is not a required field in direcuts)

KonradUdoHannes commented 11 months ago

@friep @jstet Custom error pages where introduced in particular we currently have 5 pages for

Error messages are provided depending on the current language. Please check out the functionality. I think (and changed issue tags accordingly) having some sort of error page functionality should definitely be priority, whereas fine tuning the design at some point should not. Please have a look at the current functionality and lets then discuss what we should still do pre-launch. Feel free to also comment on other design issues suited for a backlog task.

Also note a couple of site notes regarding the error pages.

KonradUdoHannes commented 11 months ago

Actually the static build on cloudflare does not seem to work currently (now that it is finished), so there seems to be a difference between npm run build && npm run preview and the static build an cloudflare.

KonradUdoHannes commented 11 months ago

A second attempt at this implemented service workers in #322. This was expected to be a robust solution for static builds, where the service worker (client side) catches all 404 errors from the webserver and reroutes them to the custom error page. Unfortunately this does not work for cloudflare at the moment as cloudflare does not actually throw 404 errors for non-existing routes.

This complicates this task significantly as not only the approaches so far don't work, but also progress requires researching/reverse engineering how cloudflare renders the static page. Afterwards one could build a solution with the disadvantage that it might be cloudflare specific.

friep commented 11 months ago

is this something cloudflare specific? i don't want to reopen the hosting provider bucket but with #334 limitations...

KonradUdoHannes commented 11 months ago

Well its not the expected behavior for static hosting, but since that is actually such a standard service I'm still wondering whether there is something that can be done one the configuration side. Either we have an issue in our configuration or we can use the configuration to work around the non-standard behavior. So far I still have a few ideas/things to try.

KonradUdoHannes commented 11 months ago

With the vercel migration the error pages now work in production and currently render a very simple general purpose "not found" page in both English and German.

@friep @jstet are there any immediate wishes for design improvements, otherwise I would close this issue.

friep commented 11 months ago

closing is fine by me :)