Recent Changes · Search:

Support the Project

Wikipublisher

PmWiki

edit SideBar

 

This page provides instructions for upgrading from PmWiki 2.1.27 and Wikipublisher 2.1.10 or below to PmWiki 2.2.x and Wikipublisher 2.1.11 or 2.2.x. There is also a special note for those running the Wikibook server software. The instructions assume you are running PmWiki 2.1.27 and refer to Wikipublisher version 2.1.11 or 2.2.x, which work with PmWiki 2.1.27 and 2.2beta65 or above.

1.  Install and test Wikipublisher 2.2.x under 2.1.27

  1. back up your wiki installation, so you can revert to a known state if necessary
  2. run a small selection of PDF tests (say 3 representative pages)
  3. download Wikipublisher version 2.2.x from the Cookbook:PublishPDF page
  4. read the README file and install the cookbook/wikipublisher scripts and pub/ components
  5. test that the previously-generated PDF files still generate correctly

2.  Install and test PmWiki 2.2.x

  1. back up your wiki installation, so you can revert to a known state if necessary
  2. follow the normal PmWiki upgrade process
  3. test that the previously-generated PDF files still generate correctly
  4. if you are running PmWiki 2.2.1 or above and Wikipublisher 2.2.10 or above, you are done
  5. if you are running earlier versions and wish to PDF pages containing pagelist directives, you need to modify scripts/pagelist.php so that Wikipublisher can over-ride the default MarkupToHTML function when generating Wikibook XML:
    • look for the function FPLTemplate( … )
    • immediately after the global statement, add global $FPLMarkupFunction; and SDV($FPLMarkupFunction, 'MarkupToHTML');
    • near the end of the FPLTemplate function, change MarkupToHTML( ... ) to $FPLMarkupFunction( ... )

3.  Why we need to modify pagelist.php

  1. Wikipublisher teaches PmWiki how to convert wiki markup into Wikibook XML instead of XHTML
  2. it starts off by qualifying all Wikibook XML tags with a namespace prefix
  3. at the end of the wiki markup to XML conversion process, it removes all tags that don’t have a namespace qualifier, on the assumption that they are probably residual XHTML tags that were not converted to Wikibook
  4. it then removes the namespace qualifier, leaving pure Wikibook XML
  5. but pagelist.php calls MarkupToHTML (the inner call) and this is inside another call to MarkupToHTML (the outer call)
  6. at the end of the inner call, all the Wikibook tags have had their namespace qualifiers stripped away, so the outer call thinks they are XHTML and removes them
  7. the fix is to substitute a function for the inner call that first calls MarkupToHTML and then puts back the namespace qualifiers
  8. now the outer call finds correctly-qualified Wikibook XML tags and leaves them alone

4.  Transition issues

Some users may encounter problems arising from how PmWiki handles transition from older, now-deprecated markup rules. After installing Wikipublisher, some markup rules or third party recipes may seem to behave in unexpected ways; for example:

  • nested divs
  • custom edit screens
  • vertical space
  • wiki words
  • start of line spaces

If so, try adding the following line at the end of local/config.php:

    SDV($Transition['version'], 2001999);

This appears to be a mis-feature of the PmWiki scripts/transition.php script, which turns on all transition flags if any such flags are enabled. This was fixed in PmWiki 2.2.0-beta66. Wikipublisher enables the fplbygroup transition.

5.  Important information for Wikibook server users

If you are running your own Wikibook server, as described in Install the Server, when you upgrade to PmWiki 2.2.x you also need to update local/AccessControl.SplashScreen.php. An update is included in accesscontrol.tar.gz Δ.

This update fixes a problem that prevents sites running PmWiki 2.2.x from displaying the server version number when the Wikibook server displays the Splash Screen.

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 01 May 2009 at 01:42 PM