[pmwiki-users] Invisible Links

The Editor editor at fast.st
Wed Mar 7 21:26:28 CST 2007


On 3/7/07, Kathryn Andersen <kat_lists at katspace.homelinux.org> wrote:
> On Wed, Mar 07, 2007 at 11:24:19PM +0000, Doug LaMar wrote:
> > After upgrading to Version 2.1.27, many of the links on pages do not render.
> > They do appear when the page is viewed in EDIT mode.
> >
> > We have tracked this down to a point. Any link that includes the Base Group
> > and more than one group deep in the path - fails to display on the page.
> >
> > For example. Our Wiki highest level group is named ASTD
> >
> > The following Link will appear: [[ASTD\Membership|membership]]
> >
> > The following Link does not appear: [[ASTD\Membership\TeamMembers|Team
> > Members]]
> >
> > the following link appears: [[Membership\TeamMembers|Team Members]]
>
> Um, those links would never work in any version of PmWiki.  PmWiki only
> has a two-level hierarchy.  There is no such thing as a three-level
> hierarchy in PmWiki.
> And why are you trying to make links with \ rather than / ?  They
> shouldn't work either.
>
> I'm surprised that they ever worked at all.
>
> Kathryn Andersen


Though Kathryn didn't mention it, Cluster and Hg do allow more than
two levels of hierarchy, though they won't help with your backward
slashes.  How you got it to work in the past is a mystery to me
also...

It may be possible to resolve the page names in a way that might
provide a bandage (though not a great one).  Stepping out on thin ice,
I'd suggest trying putting something like this early in your
config.php:

$pagename = FixIt($pagename);

function FixIt($pagename) {
    $pagename = str_replace("\", "/", pagename);
    return $pagename;
    }

or for that matter perhaps you could even try just...

$pagename = str_replace("\", "/", $pagename);

It should fool PmWiki into thinking the slashes are proper without
messing up the correct links. I've just been tinkering a lot with this
kind of stuff in upgrading Hg and don't fully grasp the implications
of such a move but maybe others will be able to pitch in more help.
Also, the function above is not tested.  I've noticed a problem with
slashes in situations like this and sometimes have to define them as
variables first and then put the variables into the str_replace
function. So you may have to play around with it...

Anyway, hope this helps, or at least sparks an idea from someone else.

Cheers,
Dan



More information about the pmwiki-users mailing list