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

Noticed on an 0.17.0 install that you couldn't reparent only worked when you reparented via ID, not a freeform name. (will save this one as a seperate issue)

When I changed DeanG's parent page to "Dean Goodmanson" it not only failed, but crashed as follows:

Traceback (most recent call last):
 File "/usr/local/zope/instance/Products/ZWiki/UI.py", line 110, in addStandardLayoutTo
   (self,REQUEST),kw)
 File "/usr/local/zope/software/lib/python/Shared/DC/Scripts/Bindings.py", line 252, in __call__
   return self._bindAndExec(args, kw, None)
 File "/usr/local/zope/software/lib/python/Shared/DC/Scripts/Bindings.py", line 283, in _bindAndExec
   return self._exec(bound_data, args, kw)
 File "/usr/local/zope/software/lib/python/Products/PageTemplates/ZopePageTemplate.py", line 228, in _exec
   result = self.pt_render(extra_context=bound_names)
 File "/usr/local/zope/software/lib/python/Products/PageTemplates/PageTemplate.py", line 95, in pt_render
   tal=not source, strictinsert=0)()
 File "/usr/local/zope/software/lib/python/TAL/TALInterpreter.py", line 200, in __call__
   self.interpret(self.program)
 File "/usr/local/zope/software/lib/python/TAL/TALInterpreter.py", line 244, in interpret
   handlers[opcode](self, args)
 File "/usr/local/zope/software/lib/python/TAL/TALInterpreter.py", line 669, in do_condition
   self.interpret(block)
 File "/usr/local/zope/software/lib/python/TAL/TALInterpreter.py", line 244, in interpret
   handlers[opcode](self, args)
 File "/usr/local/zope/software/lib/python/TAL/TALInterpreter.py", line 592, in do_insertStructure_tal
   structure = self.engine.evaluateStructure(expr)
 File "/usr/local/zope/software/lib/python/Products/PageTemplates/TALES.py", line 217, in evaluate
   return expression(self)
 File "/usr/local/zope/software/lib/python/Products/PageTemplates/ZRPythonExpr.py", line 48, in __call__
   return eval(code, g, {})
 File "Python expression "''+here.navlinks()+''"", line 2, in f
 File "/usr/local/zope/instance/Products/ZWiki/Parents.py", line 217, in navlinks
   prev, next = self.previousPage(hierarchy), self.nextPage(hierarchy)
 File "/usr/local/zope/instance/Products/ZWiki/Parents.py", line 480, in previousPage
   i = list.index(self.pageName())

ValueError?: list.index(x): x not in list

The "Dean Goodmanson" was saved as the parent value, as I could see based on /backlinks , but only when I changed it to "DeanGoodmanson" (or removed it) did the page render.

fixed for 0.24 --Simon, Wed, 22 Oct 2003 07:03:40 -0700 reply

Thanks. Checkin message:

make new hierarchy methods more robust when a page has bogus parents;
also, check new parents more carefully. reparent() now also accepts fuzzy
page names & ids, removes duplicates, and leaves parents sorted. The
backlinks form's parent text field now interprets the string as a single
page name, like the page management form.

property change --Simon, Wed, 22 Oct 2003 07:04:48 -0700 reply

Title: 'IssueNo0633? Invalid Backlinks cause crash' => 'IssueNo0633? Invalid backlinks cause an error' Status: open => closed