As stated in Item910, Dakar has lost Cairo's
$dispViewPath
configuration item (described as "URL path to view script used to render links, relative to
$dispScriptUrlPath="), which used to allow several documented short-URLs setups to offer nice URLs that don't include the =view
word.
This configuration variable was made available to templates :
%VIEWPATH%
.
Nevertheless, Cairo's
PatternSkin templates did not use this
$dispViewPath
variable, but hardcoded URLs including the
view
word, such as
https://mail.twiki.org/do/view/Bugs/Item911
. That for, several documented short-URLs setups, such as
boum's one
, needed to patch these templates to fix this.
This has not changed in Dakar, which is quite logical since
$dispViewPath
configuration item has vanished.
But... Martin Cleaver asked me to package
boum's short-URLs setup
as a contrib alongside Dakar, which is impossible with current Dakar code due to Item910 and to this bug.
What needs to be done is :
- reintroduce the
$dispViewPath
configuration item and the %VIEWPATH%
template variable ;
- run a simple
find templates -name '*.tmpl' -exec perl -pi -e 's,/view,%VIEWPATH%,g' {} \;
on the templates directory in order to use this configurable variable instead of hardcoding stuff.
This topic has been discussed on
TWiki:Codev/ShorterURLs
.
This was fixed with the introduction of {ScriptUrlPaths} in
LocalSite.cfg. Discarding.
CC
Not really. The introduction of {ScriptUrlPaths} was welcome, and has brought the ability not to hard-code
https://mail.twiki.org/do/script
in templates, but rather to use
https://mail.twiki.org/do/script
. Great.
But in yesterday's svn (7687), there are still some templates, such as twiki.pattern.tmpl, rdiff.pattern.tmpl, view.pattern.tmpl, that still hard-code old constructions, such as
/do/view
.
That's why I'm re-openning this bug, since the problem I detected for shorter-urls setups is still alive.
-- Main.BenVoui
It appears that Arthur reverted most, if not all, of the fixes I made in SVN 7429, converting %SCRIPTURL% and %SCRIPTURLPATH% to %SCRIPTURL{"..."}% in the templates. Arthur, why?
CC
If something was reverted this was not the intention. It must have happened when I reverted the new style (gray borders) back, and I must have missed the
view
update.
Fixed in SVN 7718.
AC
Great, but there are still a few in
view.pattern.tmpl
and
twiki.pattern.tmpl
.
-- BenVoui
Last few removed in SVN 7768
CC