[Vtigercrm-developers] Event Handler broken?
Prasad
prasad at vtiger.com
Thu Nov 29 09:23:31 PST 2012
NOTE: Followup being done on other thread.
On Thu, Nov 29, 2012 at 6:00 PM, Alan Lord <alanslists at gmail.com> wrote:
> Anyone seen this before?
>
> Fatal error: Uncaught exception 'Exception' with message 'Deadlock
> occured for events: CompaniesHandler' in
> /var/www/vtiger/include/events/VTEventTrigger.inc:155 Stack trace: #0
> /var/www/vtiger/include/events/VTEventsManager.inc(118):
> VTEventTrigger->trigger(Object(VTEntityData)) #1
> /var/www/vtiger/data/CRMEntity.php(812):
> VTEventsManager->triggerEvent('vtiger.entity.a...',
> Object(VTEntityData)) #2 /var/www/vtiger/modules/Accounts/Save.php(103):
> CRMEntity->save('Accounts') #3 /var/www/vtiger/index.php(749):
> include('/var/www/vtiger/mo...') #4 {main} thrown in
> /var/www/vtiger/include/events/VTEventTrigger.inc on line 155
>
> I can't work out what has caused it to stop working :-(
>
> Now I can't save any entity, even though the Event Handler registration
> record has
>
> event_name: vtiger.entity.aftersave
> handler_path: modules/Companies/CompaniesHandler.php
> handler_class: CompaniesHandler
> cond: moduleName in ['Companies', 'Quotes', 'SalesOrder',
> 'Invoice']
> is_active: 1
> dependent_on: []
>
> so it shouldn't be triggered at all when I am trying simply to save a
> Lead or an Account for example.
>
> In the CompaniesHandler class I also have a check:
>
> class CompaniesHandler extends VTEventHandler {
>
> function handleEvent($eventName, $data) {
> if($eventName == 'vtiger.entity.aftersave') {
> $module = $data->getModuleName();
> if ($module == "Companies") {
> self::coPreProccessor($data);
> } else if ($module == "Invoice" || $module ==
> "Quotes" || $module ==
> "SalesOrder") {
> self::updateCoSeqData($data);
> }
> }
> }
>
> This was all working until recently (I think) but something seems to
> have caused it to break and I can't work out what...
>
> But firstly, why on earth is my event handler even being called when I
> am saving an entity which is not in the event registration condition field?
>
> The entity does actually get saved by the way. So this error is
> definitely happening on the "aftersave" event trigger...
>
> Cheers
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121129/69aede5e/attachment.html
More information about the vtigercrm-developers
mailing list