You are here: Foswiki>Tasks Web>Item13421 (12 Dec 2017, GeorgeClark)Edit Attach

Item13421: Jump to redirecting page creates infinite redirect-loop

Priority: Urgent
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: RedirectPlugin
Reported By: LieVen JohnRouillard
Waiting For:
Last Change By: GeorgeClark
When doing a "Jump" to a non-existing page, one is automatically lead to the message "Topic 'FooFam' does not exist".

When doing the same thing with an apostrophe in the word (like "Foo'Fam") then one is automatically lead to WebHome. (this is a minor bug, but nevermind)

If WebHome has a redirect to a different page (e.g. "Welcome" or "Mainpage"), then the redirect goes into a never ending loop and creates an error message.

To recreate the error go here: and write something with an apostrophe in the box.

This error also happens with any redirecting page you jump to. Try jumping to TKD.

-- LieVen - 21 May 2015

The plugin already adds: redirectedfrom=$web.$topic

What if it were to append: &redirectedvia=$web.$topic to the url for every intermediate redirected page.

The plugin can then check to see if the current $web.$topic is already in one of the redirectedvia parameters? If so it stops redirecting, and generates and redirects to an oops page with: redirect loop listing redirectedfrom as the initial page and listing all the redirectedvia pages in the same order they are in the url).

Also the number of redirectedvia in the URL can be used to prevent large loops. Maybe limit the number of redirects to 5 or 10 (settable via config perhaps?).

Does this sound like a reasonable implementation mechanism?

-- JohnRouillard - 05 Jul 2015

Setting this to confirmed. I've seen redirect loops as well. But needs a developer to pick it up. Extension can be freely modified.

-- GeorgeClark - 12 Dec 2017


ItemTemplate edit

Summary Jump to redirecting page creates infinite redirect-loop
ReportedBy LieVen JohnRouillard
Codebase trunk
SVN Range
AppliesTo Extension
Component RedirectPlugin
Priority Urgent
CurrentState Confirmed
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 12 Dec 2017, GeorgeClark - This page was cached on 05 Jun 2020 - 17:46.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy