[Zope-CMF] Scriptable Type Problem ...

Bill Anderson bill@libc.org
06 May 2001 15:12:44 -0600


Ok, I've been banging my head long enough...

I have been playing with Scriptable Type, making a custom version of
Document. the problem started with the edit form .. apparently when
created the object does not have a text0format attribute (even if in the
Script (Python) I do: item.setFormat('structured-text') ).

no big deal, I'll just customize document_edit_form, rename to
brief_edit_form and remove it (and change the actions tab to reflect
it). no go. The form displays, but now when I submit, it gripes about
the lack of text-format. So I add a hidden variable to make it
stuctured-text. Now, I get another problem ... a NameError on sys!


Following, is the Traceback, hope someone else can make more sense of it
than I have ...

Traceback (innermost last):
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
    (Object: DynamicType)
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
    (Object: document_edit)
  File /usr/local/Zope/Zope-2.3.1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
    (Object: document_edit)
  File /local/ZopeSites/LiBC/Products/CMFCore/FSDTMLMethod.py, line 218,
in __call__
    (Object: document_edit)
  File
/usr/local/Zope/Zope-2.3.1-src/lib/python/DocumentTemplate/DT_String.py,
line 538, in __call__
    (Object: document_edit)
  File
/usr/local/Zope/Zope-2.3.1-src/lib/python/DocumentTemplate/DT_Util.py,
line 334, in eval
    (Object: edit(REQUEST['text_format'],
                 REQUEST['text'], REQUEST.get('file', '')))
    (Info: edit)
  File <string>, line 0, in ?
  File /local/ZopeSites/LiBC/Products/CMFCore/WorkflowCore.py, line 128,
in __call__
    (Object: edit)
NameError: (see above)