[Vtigercrm-developers] Events of different custom modules interfere

admin at a-g-c.de admin at a-g-c.de
Wed Sep 16 06:59:31 PDT 2009


Hi all,
I guess I found a bug in the eventing logic, or I just do not know how
to use it properly. In the latter case we might have a bug in the
documentation ;-)

Assuming:
I have two custom modules (A and B).
Both custom modules implement own event handlers (AHandler, BHandler)
for the events vtiger.entity.aftersave and vtiger.entity.beforesave.
I do have the according entries in the tables vtiger_eventhandlers and
vtiger_eventhandler_module as well.

After implementing the eventhandler of module B for event
vtiger.entity.beforesave I realized that this event handler is executed
when module A is saved (and also when module B is saved).

I had a look at the according event sources and it seems to me that
there is no logic implemented that checks which event handler to use for
which module. It just catches the next event handler class from the
table vtiger_eventhandlers, without considering the data stored in table
vtiger_eventhandlers_module (which handler to use for which module).

There is a method implemented to read vtiger_eventhandlers_module, but
it is not used at all in vtiger 5.1.0!

Any clues?
Is this an open development topic?

Kind Regards
Andreas




More information about the vtigercrm-developers mailing list