01323: "Path :" intermap within a link goes to default page on some sites

Summary: "Path :" intermap within a link goes to default page on some sites
Created: 2013-08-31 16:49
Status: Open
Category: Bug
From: RandyB
Assigned:
Priority: 3
Version:
OS:

Description: While testing PITS.PITSList I discovered that on my site

[[Path:?test=1|stay on current page]]

stay on current page

takes me to my default page instead of staying on the current page.

The Path: intermap is intended to create links relatively to the website, (almost*) exactly as you write them. If you look at the HTML output, you'll see that this link is just pointing to "?test=1" and your browser does what it can to follow it (removes any existing query string starting with "?" from the current URL and appends the new query string; there is a difference when $EnablePathInfo is set). So, when you use the Path: intermap, just place the link you want the browser to follow -- if in doubt, start your links with "/" relatively to the site root, eg. Path:/pmwiki/pub. (*almost=we don't allow javascript: or other protocols to go into these links.) --Petko August 31, 2013, at 11:13 PM

Okay, I misunderstood what it does. I was hoping it would change the request in the URL by appending a new value without changing any of the other requests. Is there an easy way to do that? I've written a function to do it, so I can write [[{$FulllName}{$parmset}?request=newvalue]], but I would guess there is a better way to do it. RandyB August 31, 2013, at 11:41 PM

Currently there is no such way for many parameters (only {*$PageUrl}) but it may be easy to have your current url in a custom page variable, or use HttpVariables and in the page construct your URL like {*$PageUrl}&request1={$?request1}&request2={$?request2}&request3=newvalue. --Petko September 01, 2013, at 02:41 AM