Pier and Seaside 3.2

Recently there were issues with the Pier3AddOns Build due to it attempting to use the latest version of SeaSide. While dealing with this, an issues with links Missing Embedded was encountered (Pillar does not require this).

Before I could find the solution, Peter Meadows released the following code (around November 15, 2016):

"Load newer version of Pier based on Peter H. Meadows email on Nov-15"
Gofer new
    smalltalkhubUser: 'Pier' project: 'Pillar';
    configuration;
    loadDevelopment.

Gofer new
    url:'http://www.smalltalkhub.com/mc/phm/PierLoadExperiment/main';
    package: 'ConfigurationOfPierLoadExperiment';
    load.
((Smalltalk at: #ConfigurationOfPierLoadExperiment) project version: #stable) load.

Gofer new
    url:'http://www.smalltalkhub.com/mc/phm/PierLoadExperimentChanges/main';
    package: 'ConfigurationOfPierLoadExperimentChanges';
    load.
((Smalltalk at: #ConfigurationOfPierLoadExperimentChanges) project version: #stable) load.

ZnZincServerAdaptor startOn: 8080.

PRPierFrame registerAsApplication: 'pier' kernel: (PRKernel instanceNamed: 'pier').

(WAAdmin defaultDispatcher handlerAt: 'pier' ) exceptionHandler: WADebugErrorHandler .

If one loads a Pharo 5 Pillar image (from here), then runs the above code (without loading Pillar), then the pages show up with the title Not Found. Links are still fishy - *link to same page>.* works as expected, links to other pages do not. Editing things like the title cause more problems - such as the title not being embedded.

The reason for this loss off embedded internal links is that the parser has changed - in Pier 3.1 PRDocumentDescription>>parserClass answers PRDocumentParser, where the newer version answers PRPillarParser. When Pier 3.2 parses +name+, it interprets this as a PRFigure, for Pier this does not yet display. Changing this behavior to cause the plus to output a link would be difficult since it would require using two different symbols for the same class (the class is the dictionary's key - see PRPillarGrammar>>defaultMarkups).

(PRPillarPierParser markups at: PRFigure) = '+'.

Another alternative is to use link parameters - such as:

*/information/syntax|embedded=true|otherparameters*

Other reasons to use this:

  • Parameters are already in common use for value links. PRValueLink>>isEmbedded should always return true (in a small example it was all three false: PRValueLink allInstances collect: [ :e | e isEmbedded ])
  • Embedded internal links are not common on mature wikis although they are used to reduce repeating information. They make editing a page complex. Having a long syntax shouldn't be an issue
  • There are several places where PRPillarParser is hardcoded, subclassing it would require changing several of these
  • Replacing the parser completely does not embrace the Pillar changes - the existing parser isn't as error-resistant as the new Pillar parser. For example consider a page that has two single quotes for italics, but does not have the second set to close it out (like '' this).

Peter hasn't gotten back to me in response to any of the emails I sent, so I"m planning to publish the code with attribution to him so it is possible to get Pier working with Seaside 3.2.

Posted by John Borden at 8 February 2017, 3:14 am with tags Pier link