[Zope] Can't update properties of a custom product
Thierry FLORAC
thierry.florac@onf.fr
Thu, 20 Feb 2003 10:45:28 +0100
Hi,
I finally found where my problem comes from ; I noticed that the exception
response headers was containing references to the file which raised the
exception : DateTime.py, line 655 !!
After looking at the code and making a few more tests, I finally found that
Zope don't accept 'None' or empty values for 'date' properties : you have to
enter a valid date for date properties !!
So my new question is simple : as en empty value is significant in several
cases for this product, how can I handle empty date properties, without using
string properties which will be converted as date in internal properties ??
Thanks,
Thierry
On Thursday 20 February 2003 10:22, Thierry FLORAC wrote:
> 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
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
--
Linux every day, keeps Dr Watson away...
http://gpc.sourceforge.net -- http://www.ulthar.net