Skip to content

Draft: custom error pages!

Fridtjof requested to merge error-pages into master

Closes #1559

What does this MR do?

It hooks up basic custom error page handling.

Currently, this sort of breaks symfony's exception pages (because it replaces them), so this is still a draft.

Feel free to assign yourself to this MR if you want to take a spin at a proper fancy error component :D I was thinking of a smaller, centered box with an error kind of symbol/warning sign, and some explanatory text depending on the status code.

I'll look into fixing this up in dev mode in the meantime.

Update: yeah this also applies to API responses right now, this really needs some extra handling

How confident are you it won't break things if deployed?

The error pages are more complex than what Symfony itself renders, so errors pages might fail themselves. Worth the visual benefits to our users though, imo

Links to related issues

How to test

Symfony offers special URLs to test error pages:

http://localhost:18080/_error/404 for example gives you the error page for a 404, and so on.

Right now, in most cases, this even overrides the exception pages from Symfony in dev, which I'm still trying to avoid - you can test if this works by intentionally causing a PHP error anywhere else and visiting the respective page. Currently, you get an empty foodsharing template page instead of the usual Symfony exception page.

Screenshots (if applicable)

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • added to the next milestone (see https://gitlab.com/foodsharing-dev/foodsharing/-/milestones, unless it has a "for:Dev" label)
  • added an entry to CHANGELOG.md
  • added a short text in the release notes to /release-notes/YYYY-MM.md
  • Once your MR has been merged, you are responsible to create a testing issue in the Beta Testing forum: https://foodsharing.de/region?bid=734&sub=forum. Please change the MRs label to "state:Beta testing".
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...) how this change can be tested.
    • Be aware, that also non technical people should understand.
Edited by Fridtjof

Merge request reports