We're updating the issue view to help you get more done. 

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

Deployment actions

None

Technical tasks

None

Status

Assignee

Unassigned

Reporter

Marijn Otte

Product owner

Marijn Otte

OTM project ID

None

Client

Integrated Marijn

Plan date

None

Developer

Ger Jan van den Bosch

Code reviewer

Koen Prins

Max. hours

None

Error message

None

Follow up date

None

Switches

None

Refiner

None

Story Points

5

Time tracking

15h

Sprint

None

Fix versions

Priority

Major