From 4df88b601b1900c287051d827eaff46f498f60d0 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 19 Aug 2026 16:05:40 +0200 Subject: Redirect a page to a node or an external URL Page#redirect_target resolves the precedence and returns nil for a destination that is restricted or has no head, so a page with a broken target renders itself rather than linking nowhere. The banner partial will call the same method, so the redirect and the link cannot drift. One hop, no exceptions, checked in publish_draft! rather than as a validation: two nodes publishing concurrently could each pass a save-time check and still produce a chain. "Live" means heads only, a draft redirect that has not published is not yet a link anyone can follow. Node.search excludes redirecting pages. editor_search does not: an editor looking for one searches by title, and only the body is worth hiding. --- config/locales/en.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config/locales/en.yml') diff --git a/config/locales/en.yml b/config/locales/en.yml index cce5f12a..54d973e2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -91,6 +91,10 @@ en: attach_in_trash: "Cannot attach assets to a node in the Trash" not_permitted: "Only Redaktion members may change published content in this section" attach_with_autosave: "Cannot attach assets to a node with unsaved changes in the editor" + redirect_to_self: "A page cannot redirect to itself" + redirect_target_missing: "The page this was to redirect to no longer exists." + redirect_to_redirect: "Cannot redirect to a page that itself redirects" + redirect_would_chain: "Another page already redirects here, so this page cannot redirect onward" page: attributes: slug: -- cgit v1.3