I’ve set up several redirects on my site using the ‘Advanced > Page redirect’ option. All have worked absolutely fine up until now; they simply go from a top-level page to one of that page’s children.
However, having just enabled this for one more page - the last ordered top-level page (if that makes any difference) - I am now getting redirect loops from every page in the site (excluding the admin interface) to the location that I have just asked to redirect to.
The redirect I’ve just set up that’s doing this is from /contact to /contact/info - so every page is redirecting to /contact/info, including /contact/info itself. What’s going on here?
Ok I found the problem. I think this is the same in Grav 1.0 as it is in 1.1, so you can probably just apply this same fix in your local:
Basically you have a page.find('/contact') in your footer links, this is called with redirect=false so it doesn’t follow redirect links, however, this was falling into this check even when the page was legitimately found, skipping the check for page valid page. I broke out the page level redirect from this check and that sorted it.
Nasty little bug that really only happened because you were doing a find() on the same page you had a redirect in. All sorted now I think!