creationdatetime not set when VersionedContent objects are created
Bug #125602 reported by
Andy Altepeter
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.
Changed in silva: | |
importance: | Undecided → High |
Changed in silva: | |
status: | Fix Committed → Fix Released |
milestone: | none → 2.0.1 |
To post a comment you must log in.
the set_creation_ datetime function used to manage_ afterAdd
called in SilvaObject.
Now in Silva2.0, which uses zope3 events, this is placed in an event handler, object_ moved, and registered on the IObjectMoved event. This
SilvaObject.
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 cirdan. its.bethel. edu:9180/ sr/edit/ add_object_ submit FileSystemSite. FSPythonScript, line 108, in __call__ DC.Scripts. Bindings, line 313, in __call__ DC.Scripts. Bindings, line 350, in _bindAndExec FileSystemSite. FSPythonScript, line 164, in _exec views/Silva/ edit/Container/ add_object_ submit used views/Silva/ edit/Container/ Publication> FileSystemSite. FSPythonScript, line 108, in __call__ DC.Scripts. Bindings, line 313, in __call__ DC.Scripts. Bindings, line 350, in _bindAndExec FileSystemSite. FSPythonScript, line 164, in _exec views/Silva/ add/add_ submit used views/SilvaDocu ment/add/ Document> FileSystemSite. FSPythonScript, line 108, in __call__ DC.Scripts. Bindings, line 313, in __call__ DC.Scripts. Bindings, line 350, in _bindAndExec FileSystemSite. FSPythonScript, line 164, in _exec views/SilvaDocu ment/add/ Document/ add_submit_ helper> Silva.zcml. handlers, line 196, in factory_method event, line 26, in dispatch _api, line 130, in subscribers registry, line 290, in subscribers adapter, line 535, in subscribers event, line 33, in objectEventNotify _api, line 130, in subscribers registry, line 290, in subscribers adapter, line 535, in subscribers Silva.SilvaObje ct, line 593, in object_moved Silva.SilvaObje ct, line 125, in _set_creation_ datetime SilvaMetadata. MetadataTool, line 148, in getMetadata
http://
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.
Module Shared.
Module Shared.
Module Products.
Module None, line 4, in add_object_submit
- <FSPythonScript
at /sr/service_
for /sr/service_
- Line 4
Module Products.
Module Shared.
Module Shared.
Module Products.
Module None, line 51, in add_submit
- <FSPythonScript at /sr/service_
for /sr/service_
- Line 51
Module Products.
Module Shared.
Module Shared.
Module Products.
Module None, line 1, in add_submit_helper
- <FSPythonScript
at /sr/service_
- Line 1
Module Products.
Module OFS.ObjectManager, line 347, in _setObject
Module zope.event, line 23, in notify
Module zope.component.
Module zope.component.
Module zope.component.
Module zope.interface.
Module zope.component.
Module zope.component.
Module zope.component.
Module zope.interface.
Module Products.
Module Products.
Module Products.
BindingError: invalid content type Silva Document for metadata system
For Documents (and prob. all VersionedContent types that use the provided datetime on the object (a "Silva Document"), which isn't
dynamic content_factories), the object_moved event calls
_set_creation_
registered in the metadata system.
Silva...