Redirection / 404 / 500 strategy

Description

Background

  • When changing content URLs (content type pages) old URLs throw a 404 instead of redirecting to the new one

  • A 404 page is currently not supported

  • A 500 page is currently not supported

Requirements

  • Before throwing a 404, find the last part of the URL (after the last /). If there is one, try to find a content item with that slug. When found and isPublished, redirect to the current URL (use the content type pages service to redirect)

  • Support use of a 404 page in a theme and apply it when a 404 is shown. (I think it should be error/404.html.twig). Add a 404 to the default theme, or use the Symfony standard as fallback

  • Support use of a 500 page in a theme and apply it when a 500 is shown. (I think it should be error/500.html.twig). Add a 500 to the default theme, or use the Symfony standard as fallback

  • When no channel or website connector have been configured redirect to the content navigator (/admin/content)

  • Must be added to the WebsiteBundle or PageBundle

Test scenario's

  • Go to /asdhadjasdas/koetjeboe while "koetjeboe" is a slug of a published article. Find out if it redirects to the right article URL.

  • Change the content type page url for articles to /yoyo/{slug}. Go to /asdhadjasdas/koetjeboe. Find out if it still redirects to the right article URL.

  • Unpublish the koetjeboe article. Go to /asdhadjasdas/koetjeboe --> should display the 404.html.twig from the theme

  • Go to /sdfdsfsdfsdfds.html --> should display the 404.html.twig from the theme

  • Generate an exception in a controller in production mode --> should display the 500.html.twig from the theme

  • Go to a 404 page while the theme has no 404 view --> should display the 404.html.twig from the default theme or the Symfony standard 404 page

  • Go to / on a domain which is not configured in a channel --> should redirect to the content navigator

  • Go to / on a domain which is not configured in a website connector --> should redirect to the content navigator

  • Go to / on a domain which is configured in a website connector and has no / page --> should display the 404.html.twig from the theme

  • Go to / on a domain which is configured in a website connector and has a / page --> should display the page

Technical tasks

None

Deployment actions

None

Activity

Show:
Maartje Wessels-Wouda
August 31, 2017, 11:42 AM

Wil jij deze goedkeuren?

Ger Jan van den Bosch
September 5, 2017, 1:15 PM

De standaard error pagina van het default theme is van symfony. Als je de error pagina wil overschrijven voor de thompson theme kan je de volgende bestanden aanmaken in het themes mapje: error/404.html.twig en error/500.html.twig

API
September 7, 2017, 11:04 AM

.Notificatie preview gestuurd naar Integrated Marijn (marijn@e-active.nl)

API
September 13, 2017, 8:04 AM

.Notificatie oplevering gestuurd naar Integrated Marijn (marijn@e-active.nl)

Assignee

Unassigned

Client

Integrated Marijn

Sprint

None

Fix versions

Configure