Submitted by : simon at: 2003-10-26T21:32:35+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

On upgrade from Zope-2.5.1 to 2.6.1 and ZWiki circa 0.13 to 0.22rc2 I found that all my old bracketed FreeFormLinks? didn't work. Creating new pages with similar links works, but I saw that spaces and periods were squished out. I looked at pageWithFuzzyName() and added a patch to try to find the page with Id prior to canonicalizing it, and now my old links and pages are back. Here is the patch to the 0.22rc2 source:

 --- ZWikiPage.py       Tue Aug 26 23:20:06 2003
 +++ /home/build/Wiki/Zope-2.6.1-linux2-x86/lib/python/Products/ZWiki/ZWikiPage.py      Wed  Aug 27 15:00:43 2003 
 @@ -1016,6 +1016,10 @@
              name = unquote(name)
          p = self.pageWithName(name)
          if p: return p
 +        # Try raw pageId, for bw compat
 +        p = self.pageWithId(name)
 +        if p: return p
 +        # Nope, continue
          id = self.canonicalIdFrom(name)
          idlower = string.lower(id)
          ids = self.pageIds()


comments:

... -- Wed, 27 Aug 2003 13:54:55 -0700 reply
Hmm. That patch got kind of ugly. Sorry. And I didn't sign the post, either. Clay Haapala (chaapala at cisco dot com).

from Clay Haapala (chaapala at cisco dt com) -- Wed, 27 Aug 2003 13:55:36 -0700 reply

... --SimonMichael, Wed, 27 Aug 2003 20:49:25 -0700 reply
Thanks Clay.. did you see the 0.17 ReleaseNotes ? /upgradeAll will fix these ids for you, which is advantageous. The linking code was hard to get right and I'm reluctant to make any quick changes.

property change --SimonMichael, Wed, 27 Aug 2003 20:50:14 -0700 reply
Category: general => installation Severity: serious => minor

... --SimonMichael, Wed, 27 Aug 2003 21:06:30 -0700 reply
PS I must say I don't understand it either. name contains an old freeform name with spaces , right ? How does it find pages with an id like that ?

upgradeAll fails -- Thu, 04 Sep 2003 11:24:25 -0700 reply
I tried an upgradeAll, but it fails with a Zope I/O error. # Module ZPublisher?.Publish, line 150, in publish_module ... IOError?: [Errno 5]? Input/output error

pages by Id -- Thu, 04 Sep 2003 11:27:40 -0700 reply
Well,I dunno how it finds them by Id that way. The pages were created under Zope 2.5.x, maybe? The patch is working for our department here. Clay

information --SimonMichael, Sat, 27 Sep 2003 02:03:16 -0700 reply
what happens is upgradeAll fixes the ids and makes the links work, but in the process converts freeform links to wikiname links.

property change --simon, Tue, 25 May 2004 00:11:33 -0700 reply
Status: open => closed

oh --simon, Tue, 25 May 2004 00:12:46 -0700 reply
Or is there a weakness here after all ? Well if anyone cares they can reopen this and fix it.