[Zope-CMF] Moving CMF product from DTML to ZPT
Wed, 12 Feb 2003 18:36:33 +0100
> Well, I managed to create a simple Product that implements a new CMF
> content type for multilingual documents. I used DTML for the skin data,
> because that's what I knew (and because that's what CMFBoringProduct
> uses, and I was using it as an example).
congrats ;-) .. you could look at CMFTypes which lowers the threshold
for developing products. essentially you just define a schema and it
the classes and forms.
> I managed to get the view PT sort-of working -- it doesn't crash, at
> least. But the edit_form PT is broken and I'm quite mystified; here's
> the traceback I get when I try to edit an instance of MLDocument:
> Traceback (innermost last):
> * Module ZPublisher.Publish, line 98, in publish
> * Module ZPublisher.mapply, line 56, in mapply
> AttributeError: func_code
> Yes, that's all there is -- probably the shortest Zope traceback on
> record. From reading the code in ZPublisher/mapply.py, it looks as
> though some object somewhere has an 'im_func' attribute but no
> 'func_code' attribute -- but mapply() assumes the presence of 'im_func'
> implies the presence of 'func_code'. Apparently something I've done is
> violating some low-level assumption in Zope -- but how?!? Anyone have a
> clue what's going on here?
Attribute func_code I believe is returned when you run a python script
that isnt compiled or can not compile. maybe look at this? the traceback
in error_log didnt give you any more information?
if you click on a Pagetemplate and get the func_code exception...
some is vastly borked. I have only gotten this from PythonScripts.
What version of Zope?