[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Bug in 2.0.8 navbar, limiting submenu depth to 2.



Hi,

I use wml::des::navbar to render a navigation bar with a maxdepth of 4.
The submenu tree corresponds to the underlying filesystem structure.

After upgrading from 1.7.4 to 2.0.8, I found all navbar images and links
of depth 3+ aiming at wrong directories. 

For example at depth 3 something should be
	"../../images/file.gif"
but pass 3 made it
	"/images/file.gif"

urlbase, imgbase, $(ROOT) and $(IMG_BASE) were set ok.
I traced the error back to wml::des::navbar calling 
canonpath() from wml::sup::path.

Seems like Ralf had tried to simplify line 50 
of /usr/lib/wml/include/sup/path.wml from
	$path =~ s|([^/.][^/.]*)/\.\.||;    # Version 1.7.4
to
	$path =~ s|[^/]+/\.\.||;            # Version 2.0.8

That line is supposed to cut unnecessary parts off pathes,
e.g. transforming 
	"wrongdir/../rightdir/images/file.gif"
to 
	"rightdir/images/file.gif"

The regex now matches the first ".." of "../../images/file.gif" as 
"stepping down some subdir unneccesarily", so it should be 
corrected to

	$path =~ s|[^/.]+/\.\.||;            # Version 2.0.9?

-- 
Johannes Franken
  
Professional unix/network development
mailto:jfranken@jfranken.de
http://www.jfranken.de/
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com