fix the event handler and compatibility for different Plone versions

This fixes what commit
3fb83b9dfb041a12271faa4c17b142517f4984a8 was all about, so
now the event handler is actually executed.