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

Bug in 2.0.8 navbar, limiting submenu depth to 2.


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
but pass 3 made it

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
	$path =~ s|[^/]+/\.\.||;            # Version 2.0.8

That line is supposed to cut unnecessary parts off pathes,
e.g. transforming 

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
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com