Alan,<div><br></div><div>Can you please share a test case / hint of reproducing the bug.</div><div>If you have a setup where we can review that would useful too.</div><div><br></div><div>Regards,</div><div>Prasad<br><br><div class="gmail_quote">
On Thu, Nov 29, 2012 at 8:47 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">
Well,<br>
<br>
I have no idea why this broke at all.<br>
<br>
But after a great deal of digging, I discovered that if I remove all<br>
data from the "cond" field of the vtiger_entityhandlers table, then it<br>
all seems to work. It means I must do the testing in my handler to check<br>
I am being triggered by the right module(s) but at least it seems to work.<br>
<br>
Has something changed in PHP recently to break this?<br>
<br>
There are two other reports of this error:<br>
<br>
<a href="https://forums.vtiger.com/viewtopic.php?f=139&t=54986" target="_blank">https://forums.vtiger.com/viewtopic.php?f=139&t=54986</a><br>
<br>
<a href="http://permalink.gmane.org/gmane.comp.web.vtigercrm.devel/5668" target="_blank">http://permalink.gmane.org/gmane.comp.web.vtigercrm.devel/5668</a><br>
<br>
But no solutions - other than *don't* specify a condition value in your<br>
Entity Registration as is decribed here:<br>
<a href="https://wiki.vtiger.com/index.php/510:Eventing" target="_blank">https://wiki.vtiger.com/index.php/510:Eventing</a><br>
<br>
Can one of the vtiger devs confirm this or not?<br>
<br>
I'm sure this was working for me up until very recently, but I could<br>
have missed it, or it was due to a recent upgrade of the system (perhaps<br>
a PHP minor version hike? Currently on 5.3.10-1ubuntu3.4 with<br>
Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41) )<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
<br>
On 29/11/12 12:30, Alan Lord wrote:<br>
> 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>
><br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>