Lack of proper modified events and event descriptions in formlib and other places

Bug #98483 reported by Philipp von Weitershausen
2
Affects Status Importance Assigned to Milestone
Zope 3
Fix Released
Medium
Philipp von Weitershausen

Bug Description

ObjectModifiedEvent is a general event to indicate some property/ies, whether intrinsic or extrinsic (e.g. in annotations), of an object has changed. In itself an ObjectModifiedEvent is pretty general therefore and hence quite useless to deduct within a subscriber how the object was modified. That's why there is actually support for annotating ObjectModified events with this information:

  info = Attributes(ITheSchema, 'foo', 'bar', 'blergh')
  notify(ObjectModifiedEvent(obj, info))

(Attributes is importable from zope.lifecycleevent). Note that the object must not necessarily provide ITheSchema, it could also be that the ITheSchema(obj) adapter was changed (this is useful when sending modified events for annotation adapters like IZopeDublinCore).

The problem is that Zope itself makes little use of this yet. In particular:

* zope.formlib doens't annotate events with this information, even though it has all that information (which exact properties changed). Interesting enough, zope.app.form *does* annotate the event with the additional info.

* The 'contents.html' view for containers allows you to change the DublinCore Title property, but doesn't send any event whatsoever (it should be sending an ObjecdtModifiedEvent with Attributes(IZopeDublinCore, 'title').

* The 'edit.html' view for zope.app.file's File objects sends ObjectModifiedEvents, but doesn't annotate it with the right kind of information)

There might be other cases lurking around. These are the ones I could find offhand.

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

These have been fixed in zope.app.container 3.5.3, zope.app.file 3.4.2. zope.formlib 3.5.0 (not yet released) will contain the bugfix for zope.formlib.

Changed in zope3:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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