01228: Page location for Site.PageNotFound changed on XLPage, but not respected

Summary: Page location for Site.PageNotFound changed on XLPage, but not respected
Created: 2010-10-07 00:56
Status: Closed - replied
Category: Bug
From: CarlosAB
Assigned:
Priority: 1
Version: latest
OS:

Description: Page location was changed on PmWIkiPtBr group from "Site/PageNotFound" to "PmWikiPtBr/PageNotFound", but any call to a non-existant page calls the site wide "Site.PageNotFound" page.

The page would work on other wikis. Actually, on pmwiki.org we have a custom page Site.PageNotFound-Local so this string can be translated if we want. --Petko October 07, 2010, at 01:50 AM

Some comments:

  • It must be '{$SiteGroup}.PageNotFound' with a dot, not with a slash, as with the other three entries under section Page locations.
    Otherwise the "string translation" doesn't work.
  • I don't like current solution that on pmwiki.org above string translation does not work anymore.
    • We can't test the translation on pmwiki.org; only on local installs. This will confuse translators.
    • If we change all XLPages, as was done for PmWikiPtBr ('Site.PageNotFound-Local' => 'PmWikiPtBr.PageNotFound',,
      it will break other wikis who don't know of Site.PageNotFound-Local

So for me this does not look solved yet. - SchreyP October 07, 2010, at 02:17 PM

A current workaround could be to include both string translations in the XLPages (example for PmWikiPtBr):

  • '{$SiteGroup}.PageNotFound' => 'PmWikiPtBr.PageNotFound',
  • 'Site.PageNotFound-Local' => 'PmWikiPtBr.PageNotFound',

But this looks a bit dirty for me: to change all XLPages, only for a customization on pmwiki.org.
Petko, Can we have a change that only impacts pmwiki.org? -- SchreyP October 07, 2010, at 04:49 PM

The workaround works fine, I think we just have to put an observation for those who might need it. We could write it on Site.PageNotFound and local, as I think most people will at least take a look there before they write their own. For what you guys need a Site.PageNotFound-Local? CarlosAB October 07, 2010, at 06:08 PM

We want to have some search links when someone comes to an inexisting page (from a broken link?) on pmwiki.org, while we don't want to change the default for all wikis -- some of them don't even want a search form and a search function. --Petko November 09, 2010, at 03:31 AM

A funny thing happened while playing with PmWikiPtBr.PageNotFound, take a look at the markup for the last conditionals, as one of them is rendered as just a dot, no matter what. Tried some combinations, changed the order, rewrote the thing by hand thinking it was some utf8 "anomaly", but it is still rendered as just a dot. CarlosAB October 08, 2010, at 10:40 PM

The "dot problem" comes from the internal link function failing to recognize [[page?q=words with spaces]] as an internal link, thus returning nothing (and we only see the dot after the link). I fixed it by using a page variable {$PageUrl}. Note that on a localized wiki with the search page defined in XLPage, {$ScriptUrl} should also work fine. --Petko November 09, 2010, at 03:31 AM

I