Tags:
create new tag
view all tags

SID-01848: RedirectPlugin does not properly handle anchors

Status: Answered Answered TWiki version: 5.0.2 Perl version:
Category: RedirectPlugin Server OS: Last update: 10 years ago

A redirect from redirecting page that points to an anchor in the target topic does not go to the anchor.

-- Joshua Tharp - 2013-12-31

Discussion and Answer

The RedirectPluginDev topic had a clue on this issue.

A redirect in the topic IRedirectToSomeWhere like:

%REDIRECT{"SomeWhere#SomeAnchor"}%

Forms a URL like: {omitted}/SomeWhere#SomeAnchor?redirectedfrom=IRedirectToSomeWhere

However the anchor should be the last thing like this: {omitted}/SomeWhere?redirectedfrom=IRedirectToSomeWhere#SomeAnchor

Plugin version 26175 lines 136-138:

TWiki::Func::redirectCgiQuery( $query,
    TWiki::Func::getViewUrl( $newWeb, $newTopic ) . $anchor
    . $q );

Changed to:

TWiki::Func::redirectCgiQuery( $query,
    TWiki::Func::getViewUrl( $newWeb, $newTopic ) . $q
    . $anchor );

-- Joshua Tharp - 2013-12-31

The above solution depends on SID-01846 to function properly.

-- Joshua Tharp - 2013-12-31

Thank you Joshua! I finally updated the RedirectPlugin with your fix.

-- Peter Thoeny - 2015-12-03

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title RedirectPlugin does not properly handle anchors
SupportCategory RedirectPlugin
TWiki version 5.0.2
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2015-12-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.