NOTE: Followup being done on other thread.<br><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 6:00 PM, Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Anyone seen this before?<br>
<br>
Fatal error: Uncaught exception 'Exception' with message 'Deadlock<br>
occured for events: CompaniesHandler' in<br>
/var/www/vtiger/include/events/VTEventTrigger.inc:155 Stack trace: #0<br>
/var/www/vtiger/include/events/VTEventsManager.inc(118):<br>
VTEventTrigger->trigger(Object(VTEntityData)) #1<br>
/var/www/vtiger/data/CRMEntity.php(812):<br>
VTEventsManager->triggerEvent('vtiger.entity.a...',<br>
Object(VTEntityData)) #2 /var/www/vtiger/modules/Accounts/Save.php(103):<br>
CRMEntity->save('Accounts') #3 /var/www/vtiger/index.php(749):<br>
include('/var/www/vtiger/mo...') #4 {main} thrown in<br>
/var/www/vtiger/include/events/VTEventTrigger.inc on line 155<br>
<br>
I can't work out what has caused it to stop working :-(<br>
<br>
Now I can't save any entity, even though the Event Handler registration<br>
record has<br>
<br>
event_name: vtiger.entity.aftersave<br>
handler_path: modules/Companies/CompaniesHandler.php<br>
handler_class: CompaniesHandler<br>
cond: moduleName in ['Companies', 'Quotes', 'SalesOrder',<br>
'Invoice']<br>
is_active: 1<br>
dependent_on: []<br>
<br>
so it shouldn't be triggered at all when I am trying simply to save a<br>
Lead or an Account for example.<br>
<br>
In the CompaniesHandler class I also have a check:<br>
<br>
class CompaniesHandler extends VTEventHandler {<br>
<br>
function handleEvent($eventName, $data) {<br>
if($eventName == 'vtiger.entity.aftersave') {<br>
$module = $data->getModuleName();<br>
if ($module == "Companies") {<br>
self::coPreProccessor($data);<br>
} else if ($module == "Invoice" || $module == "Quotes" || $module ==<br>
"SalesOrder") {<br>
self::updateCoSeqData($data);<br>
}<br>
}<br>
}<br>
<br>
This was all working until recently (I think) but something seems to<br>
have caused it to break and I can't work out what...<br>
<br>
But firstly, why on earth is my event handler even being called when I<br>
am saving an entity which is not in the event registration condition field?<br>
<br>
The entity does actually get saved by the way. So this error is<br>
definitely happening on the "aftersave" event trigger...<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br>