Skip to content

vtiger.field.afterdelete not registered

There's a really handy Event Handler in modules/Vtiger/handlers/FieldEventHandler.php

This should be triggered when a call is made to the vtlib Field model's delete() method. I noticed it wasn't.

Grepping the source of vtiger I cannot find anywhere where this is registered in the vtiger_eventhandlers table, and checking various installations it never seems to have been registered.

#:~/code.vtiger.com/vtigercrm$ grep -rn "vtiger.field.afterdelete" .
./modules/Vtiger/handlers/FieldEventHandler.php:18:             if ($eventName == 'vtiger.field.afterdelete') {
./vtlib/Vtiger/FieldBasic.php:232:              $em->triggerEvent('vtiger.field.afterdelete', $this);