[Zope-CMF] Re: CMFImageDoc broken in CMF 1.2?
Chris Withers
chrisw@nipltd.com
Thu, 10 Jan 2002 02:00:14 +0000
Jon Edwards wrote:
>
> Hi Chris (cc'ing the list in case anyone else has the same problem)
>
> I've been trying out your CMF Image Document, which is pretty damn funky!
Cool thanks...
> Except.....
...some people, never happy ;-)
Although in this case I can stick my hands up "weren't me, guvnor!" ;-)
HarryW and ChrisK worked on this, I've CC'ed in Harry so hopefully he can make
the necessary changes and let you know...
cheers,
Chris
> The Edit method seems to be broken with CMF 1.2b. When I click Change on the
> edit form I get a Type Error, ending with -
>
> File Script (Python), line 9, in ImageDoc_edit
> File C:\Program Files\zope25\lib\python\Products\CMFCore\WorkflowCore.py,
> line 88, in __call__
> (Object: edit)
> File C:\Program Files\zope25\lib\python\Products\CMFCore\WorkflowTool.py,
> line 461, in wrapWorkflowMethod
> (Object: portal_workflow)
> File C:\Program Files\zope25\lib\python\Products\CMFImageDoc\ImageDoc.py,
> line 94, in _edit
> (Object: testimagedoc)
> TypeError: _edit() takes at most 4 arguments (5 given)
>
> Looking at the code, it seems like the CMFDefault/Document.py has changed,
> so that the _edit bit doesn't take "file" as a parameter any more. So your
> line -
>
> Document._edit(self, text_format, text, file, safety_belt)
>
> is causing the error? Maybe it should be changed to "Document.edit" (no
> underscore) instead?
>
> Also the next bit -
>
> #this workflowaction is at class scope
> edit = WorkflowAction(_edit)
>
> may be a problem, as there's a comment in the new Document.py that says -
>
> *used to be WorkflowAction(_edit)
>
> in the "edit" function. But I'm even less sure how to fix that, or if it's
> even a problem! :-)
>
> Hope that makes sense?
>
> Cheers, Jon