creationdatetime not set when VersionedContent objects are created

Bug #125602 reported by Andy Altepeter
12
Affects Status Importance Assigned to Milestone
Silva
Fix Released
High
Eric Casteleijn

Bug Description

In Silva-2.0, create a Silva Document. Inspect the properties tab and you'll find that the creation datetime is missing.

Revision history for this message
Andy Altepeter (aaltepet) wrote : in-depth description of the problem
Download full text (3.8 KiB)

 the set_creation_datetime function used to
called in SilvaObject.manage_afterAdd

Now in Silva2.0, which uses zope3 events, this is placed in an event handler,
SilvaObject.object_moved, and registered on the IObjectMoved event. This
event does get called when an object is added, and it does appear to set the
creationtime.

So, jumping into SilvaObject._set_creation_datetime, I'm getting a
BindingError. Here's the traceback (of course, most relevant at the bottom):

2007-07-12 11:46:40 ERROR Zope.SiteErrorLog
http://cirdan.its.bethel.edu:9180/sr/edit/add_object_submit
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 4, in add_object_submit
   - <FSPythonScript
at /sr/service_views/Silva/edit/Container/add_object_submit used
for /sr/service_views/Silva/edit/Container/Publication>
   - Line 4
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 51, in add_submit
   - <FSPythonScript at /sr/service_views/Silva/add/add_submit used
for /sr/service_views/SilvaDocument/add/Document>
   - Line 51
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 1, in add_submit_helper
   - <FSPythonScript
at /sr/service_views/SilvaDocument/add/Document/add_submit_helper>
   - Line 1
  Module Products.Silva.zcml.handlers, line 196, in factory_method
  Module OFS.ObjectManager, line 347, in _setObject
  Module zope.event, line 23, in notify
  Module zope.component.event, line 26, in dispatch
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 535, in subscribers
  Module zope.component.event, line 33, in objectEventNotify
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 535, in subscribers
  Module Products.Silva.SilvaObject, line 593, in object_moved
  Module Products.Silva.SilvaObject, line 125, in _set_creation_datetime
  Module Products.SilvaMetadata.MetadataTool, line 148, in getMetadata
BindingError: invalid content type Silva Document for metadata system

For Documents (and prob. all VersionedContent types that use the provided
dynamic content_factories), the object_moved event calls
_set_creation_datetime on the object (a "Silva Document"), which isn't
registered in the metadata system.

Silva...

Read more...

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Looks like a bug, assigning to myself.

Changed in silva:
assignee: nobody → thisfred
Changed in silva:
importance: Undecided → High
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Fixed on trunk and Silva 2.0 branch

Changed in silva:
status: New → Fix Committed
Changed in silva:
status: Fix Committed → Fix Released
milestone: none → 2.0.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.