Bug in Cliki? Was: [Lispweb] ANN: CLiki 0.4.3

rm@fabula.de rm at fabula.de
Wed May 19 13:56:43 CDT 2004

On Tue, May 11, 2004 at 05:25:40PM +0100, Daniel Barlow wrote:
> CLiki 0.4.3 is now in cCLan.  This is approximately the version that's
> been running on www.cliki.net for the past few months.
> New in CLiki 0.4.3
> * Versioning!  At the expense of making the file names correspond even
>   less closely with the page title, we now produce a version per edit.

Hmm, looks like this causes trouble: i just installed a new
Cliki from scratch (i.e. pristine sbcl-mt and with araneida (0.84)
and cliki (0.4.3)).

Now, i can't create new files. From a first look at the code it seems
as if the call to check-page-save-allowed will result in a call to
version-open-p and that will try to destructuring-bind  the result
of calling find-recent-change on the new page. Now, if i get this right
find-recent-change will return NIL if there are no recent changes and
hence destructuring-bind will raise an eyebrow or two ...

Anyway, disabling the simultaneous editing check by returning 't from
check-page-save-allowed will "fix" this bug ....

HTH and thanks for the work


> * While indexing we collect the first sentence of each page, and
>   make it accessible as (CLIKI-FIRST-SENTENCE page)
> * Legacy searches now print this out.
> * Beginning of the long slow process to separate generic cliki engine
>   stuff from www.cliki.net stuff: new cliki-net class that you
>   probably don't want to use unless you're me  
> * Indexing tweaks mean startup on big clikis may be a bit faster.  
> * Bug fixes: RSS generation, topic searches.
> * *(Uncategorized) marker added to default text for new pages.
> Note that there is also an internals change which you may run into if
> you are building cliki-based tools: to make backlink searches and
> updating simpler, CLIKI-PAGE objects are now created when references
> to non-existent pages are encountered during indexing.  These
> placeholder pages have NIL :pathname and :versions slots.
> (You can see this behaviour in action at <http://www.cliki.net/Dan%20Moniz>,
> at lease until/unless someone creates that page)
> This means that if you want to detect whether a page /really/ exists,
> you should not just rely on find-page returning NIL, but also 
> test the pathname slot:
> (defmethod write-a-href ((cliki cliki-view) title stream)
>   "Write an A HREF element for the CLiki page TITLE.  STREAM may be an open stream or T or NIL, a la FORMAT"
>   (let ((escaped (urlstring-escape title))
>         (p (find-page cliki title)))
>     (if (and p (page-pathname p))
>         (format stream "<a class=\"internal\" href=\"~A\" >~A</a>" escaped title)
>         (format stream "~A<a class=\"internal\" href=\"edit/~A\" >?</a>" title escaped))))
> Note also (although this is not new in 0.4.3) that cliki-page-header
> and cliki-page-footer are deprecated: I encourage you to use
> cliki-page-surround instead.
> -dan
> -- 
> "please make sure that the person is your friend before you confirm"

More information about the lispweb mailing list