You are here: Foswiki>Tasks Web>Item14407 (25 May 2017, GeorgeClark)Edit Attach

Item14407: Page relative Anchor links don't pick up query params, resulting in param reset and page reload.

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiRender
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Discovered by VadimBelman, that link fragments inserted into the PerlDoc text cause a reload of the page and a reset of the ?module= parameter.

The TOC macro inserts the query params into the generated links using the following:
    my @qparams = ();
    foreach my $name ( $query->param ) {
        next if ( $name eq 'keywords' );
        next if ( $name eq 'validation_key' );
        next if ( $name eq 'topic' );
        next if ( $name eq 'text' );
        next if ( $name eq 'refresh' );
        next if ( $name eq 'POSTDATA' );
        push( @qparams, $name => scalar( $query->param($name) ) );
    }
...
        my $target =
          $isSameTopic
          ? Foswiki::make_params(@qparams) . '#'
          . $a->{anchor}

It's possible to manually correct by generating a link of the form [[?%QUERYSTRING%#AnAnchor]], however foswiki should do this automatically for anchor links, inserting the current query params into links generated from [[#SomeAnchor]]

-- GeorgeClark - 25 May 2017

 

ItemTemplate edit

Summary Page relative Anchor links don't pick up query params, resulting in param reset and page reload.
ReportedBy GeorgeClark
Codebase 2.1.4, 2.1.3
SVN Range
AppliesTo Engine
Component FoswikiRender
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r1 - 25 May 2017, GeorgeClark - This page was cached on 22 Nov 2020 - 22:26.

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