Item14407: Page relative Anchor links don't pick up query params, resulting in param reset and page reload.
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
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