[pmwiki-users] Upgrade woes: PublishPDF and PmWiki 2.1beta25

John Rankin john.rankin at affinity.co.nz
Mon Feb 13 15:04:21 CST 2006


I have spent many happy hours trying to get the PublishPDF library 
to work with PmWiki 2.1beta25 and have summarised a list of 
remaining questions, issues and problems. Testing is not complete, 
so there may be more later.

I am using a plain install -- PmWiki2.1beta25 plus PublishPDF.

1. (:searchresults:) versus (:pagelist:)

Wikipublisher presents the results of a search as a form, allowing 
information seekers to turn selected pages into either HTML or PDF 
for printing. The publish search options that use (:searchresults:) 
seem to be OK. However, those that use (:pagelist:) are incorrect. 
Specifically, in this line:

<form class='publish' action='http://www.wikipublisher.org/wiki/index.php' method='get'>

the http://... gets parsed and turned into 

<a ... href='...'>http://...</a>.

I have been able to work around this by changing the Markup rule 
for this action so that (:pagelist:) markup generates 

'<:block>'.Keep(FmtPageList(...)) 

I haven't been able to work out why this is needed for pagelist 
and not searchresults and suspect it may be a bug.

2. FPLByGroup function

It was a bit of a surprise to see the FPLByGroup function removed. 
I'm not sure whether it is going to be possible to use the new 
search results formatting wiki page to define the publish form. It 
is not clear whether we can replicate the form definition variables 
set in $FPLByGroup...Fmt variables as wiki markup. So meanwhile, 
I have added FPLByGroup back to wikipublisher. I haven't finished 
testing (it's a big job), but suspect I may have the same problem 
with FPLSimple.

Some guidance would be helpful.

3. Search and the current page

On Main.HomePage, when I search for 'sandbox', I get a list of 
one page -- Main.WikiSandbox. On Main.WikiSandbox, when I search 
for 'sandbox', I also get a list of one page -- Main.HomePage. 
In both cases, it tells me it has searched one page. Is this a 
bug, a feature, or a mis-configuration?

4. $FmtV substitution

I note that by design, if the value of $FmtV['$SomeVar'] is not 
set, FmtPageName returns '$SomeVar'. This is a real pain, as I 
have to track down every use of $FmtV and check whether the 
variable assigned to it is set and if not set the value to ''. 
I'm not clear why one would want FmtPageName to return 
'$SomeVar, except perhaps for testing, so wonder if perhaps 
there might be an option one could set to tell FmtPageName 
what to do if the value of $FmtV['$SomeVar'] is not set. 
Then I could tell it "always return ''".

5. $FmtP versus $FmtPV

I note that variables once set in $FmtP are now set in $FmtPV. 
It appears that if the same substitution variable is set in 
both places, $FmtP takes precedence. Will this continue to be 
the case or should I track down all occurrences of $FmtP and 
change them to $FmtPV? To preserve backwards compatibility for 
people running PublishPDF under PmWiki 2.0, I would then have 
to check the PmWiki version. It would be nice if the library 
continued to use $FmtP, which avoids both problems.

====
None of the above changes adds any new PublishPDF functionality; 
this is all to preserve existing features. So anybody using the 
library might like to stay on 2.0.13 until this is sorted out.

Thanks in advance for any help or advice.
John
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list