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

Mike mike at widowitz.com
Sun Dec 27 14:20:51 CST 2009


Vince,
this occured to me as well, but no, they're not.

What's even more - the function does return the correct number of found 
pages - "4 pages found" - only it does not list them afterwards due to 
the described behaviour of the RetrieveAuthSection function...

Thanks for trying to help,

Mike



Vince Administration wrote on 27.12.2009 21:09:
> Mike,
> 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?
>       Vince
> 
> 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