[Zope] Can't update properties of a custom product
Thierry FLORAC
thierry.florac@onf.fr
Thu, 20 Feb 2003 10:22:13 +0100
On Wednesday 19 February 2003 21:41, Dylan Reinhardt wrote:
> At 10:23 AM 2/19/2003, Thierry FLORAC wrote:
> The error you're getting is typically the result of attempting to perform a
> slice or index operation on an empty string or a string which is
> substantially shorter than some expected length. Looking at the code, I
> can't see any place in the standard manage_editProperties where string
> slicing/indexing takes place. My guess would be that it *is* one of your
> methods kicking up this error.
As I said in my previous message, my big problem is that I don't use any
custom method in this case : it's the standard "manage_editProperties" method
which is used !!
So I suppose that it's my properties definition or contents which raise this
exception, but I really can't see anything "special" in them... :
_properties = IF_OrderedObjectManager.IF_OrderedObjectManager._properties + \
( { 'id':'owner', 'type':'string', 'mode':'w' },
{ 'id':'creator', 'type':'string', 'mode':'w' },
{ 'id':'updater', 'type':'string', 'mode':'w' },
{ 'id':'editor', 'type':'string', 'mode':'w' },
{ 'id':'publisher', 'type':'string', 'mode':'w' },
{ 'id':'creation_time', 'type':'date', 'mode':'' },
{ 'id':'creation_date', 'type':'date', 'mode':'w' },
{ 'id':'update_time', 'type':'date', 'mode':'w' },
{ 'id':'edition_time', 'type':'date', 'mode':'w' },
{ 'id':'publication_time', 'type':'date', 'mode':'w' },
{ 'id':'first_pub_date', 'type':'date', 'mode':'w' },
{ 'id':'last_pub_date', 'type':'date', 'mode':'w' },
{ 'id':'description', 'type':'text', 'mode':'w' },
{ 'id':'remarques', 'type':'text', 'mode':'w' },
{ 'id':'keywords', 'type':'tokens', 'mode':'w' },
{ 'id':'commentaire', 'type':'text', 'mode':'w' },
{ 'id':'moral_author', 'type':'string', 'mode':'w' },
{ 'id':'physical_author', 'type':'string', 'mode':'w' },
{ 'id':'updaters', 'type':'selection', 'mode':'w',
'select_variable':'getUpdatersList' },
{ 'id':'category', 'type':'selection', 'mode':'w',
'select_variable':'getCategories' },
{ 'id':'status', 'type':'selection', 'mode':'w',
'select_variable':'getStatusList' },
{ 'id':'private', 'type':'boolean', 'mode':'w' },
{ 'id':'visible', 'type':'boolean', 'mode':'w' }
)
IF_OrderedObjectManager is another class that I use as parent for other
inherited subclasses, without any problem...
I've also tried to add a "manage_editProperties(self, REQUEST)" method in my
custom class, with just "return REQUEST" as content, but the exception is
raised before the method is called, so I think that the problem is not at the
class level, but probably at the Publisher level, when the HTTP request is
handled... How can I try to debug this ???
Thierry