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">&lt;<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>&gt;</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 &#39;Exception&#39; with message &#39;Deadlock<br>
occured for events: CompaniesHandler&#39; in<br>
/var/www/vtiger/include/events/VTEventTrigger.inc:155 Stack trace: #0<br>
/var/www/vtiger/include/events/VTEventsManager.inc(118):<br>
VTEventTrigger-&gt;trigger(Object(VTEntityData)) #1<br>
/var/www/vtiger/data/CRMEntity.php(812):<br>
VTEventsManager-&gt;triggerEvent(&#39;vtiger.entity.a...&#39;,<br>
Object(VTEntityData)) #2 /var/www/vtiger/modules/Accounts/Save.php(103):<br>
CRMEntity-&gt;save(&#39;Accounts&#39;) #3 /var/www/vtiger/index.php(749):<br>
include(&#39;/var/www/vtiger/mo...&#39;) #4 {main} thrown in<br>
/var/www/vtiger/include/events/VTEventTrigger.inc on line 155<br>
<br>
I can&#39;t work out what has caused it to stop working :-(<br>
<br>
Now I can&#39;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 [&#39;Companies&#39;, &#39;Quotes&#39;, &#39;SalesOrder&#39;,<br>
&#39;Invoice&#39;]<br>
is_active:     1<br>
dependent_on:  []<br>
<br>
so it shouldn&#39;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 == &#39;vtiger.entity.aftersave&#39;) {<br>
                        $module = $data-&gt;getModuleName();<br>
                        if ($module == &quot;Companies&quot;) {<br>
                                self::coPreProccessor($data);<br>
                        } else if ($module == &quot;Invoice&quot; || $module == &quot;Quotes&quot; || $module ==<br>
&quot;SalesOrder&quot;) {<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&#39;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 &quot;aftersave&quot; 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>