Skip to content

creating multiple eventhandlers with the same class_name, creates "deadlock" error

Some context first:

image

If you register an eventhandler with the same class_name (different handler_path though) as an already existing event, you get an exception when saving a record:

{"success":false,"error":{"code":"Deadlock occured for events: ","message":"Deadlock occured for events: ","title":null}}

the error is misleading because the problem is not a deadlock.

Vtiger should prevent creating event_handlers with the same name in the first place. You can simply make handler_class unique in vtiger_eventhandlers schema or throw an exception in include/events/VTEventsManager::registerHandler().