[pmwiki-users] Help please - Bug in Pagelist.php?

Mike mike at widowitz.com
Sun Dec 27 12:20:02 CST 2009


Hello everyone,

after many hours of trying around, I'm really desperate by now. It seems 
to me that there is a strange bug in pagelist.php, yet I know this is 
not the case. However I'm unable to identify the problem...

What happens:
* I have my PmWiki page up and running and added a Search box
* This is obviously calling pagelist.php to return results
* When a user is logged in, the search page returns the results as expected
* When a user is not logged in, the search page indicates the right 
number of "hits" (e.g. "fox" found on 4 pages), but does not list these 
pages.

Why is this happening?

At the core of it, in pagelist.php, there is the section

## Loads a template section
function FPLTemplateLoad($pagename, $matches, $opt, &$tparts){
/* in dieser Funktion wird - oder wird eben nicht - das Template in die 
$tparts eingeladen */
   global $Cursor, $FPLTemplatePageFmt, $RASPageName, $PageListArgPattern;
   SDV($FPLTemplatePageFmt, array('{$FullName}',
     '{$SiteGroup}.LocalTemplates', '{$SiteGroup}.PageListTemplates'));
   $template = @$opt['template'];
   if (!$template) $template = @$opt['fmt'];
   $ttext = RetrieveAuthSection($pagename, $template, $FPLTemplatePageFmt);

And this function - RetrieveAuthSection - is the point where I'm about 
to give up. If the user is not logged in, it returns BOOL(FALSE) - and 
as a result, the $ttext will not be processed into meaningful output. If 
the user *is* logged in, $ttext will get a value like

" (:template first {=$Group}:) :[[{=$Group}/]] /: (:template each:) : 
:[[{=$Group}/{=$Name}]] "


Maybe I'd be able to sort this out, but I feel that I'm already digging 
into far too deep parts of the PmWiki code, and this just CANNOT be a 
bug cause it would already have been observed. Probably some parts of my 
setup are screwing something up - but I already deactivated all of my 
cookbooks and entries in local.php....... so I'm really desperate....

THANK YOU for any help. Cheers,

Mike




More information about the pmwiki-users mailing list