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

Vince Administration vadmin at math.uconn.edu
Sun Dec 27 14:09:47 CST 2009

It would seem to me that if the user is not logged in and he is not authorized to read the page, then RetrieveAuthSection 
should not retrieve the page.   Are the pages read protected?

On Dec 27, 2009, at 1:20 PM, Mike wrote:

> 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
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

More information about the pmwiki-users mailing list