<div dir="ltr">From what you say, it seems to me that, for some reason, method_exists($instance, 'vtlib_handler') is returning false.<div>I think you could move $instance->vtlib_handler((string)$modulename, (string)$event_type); before the if(method_exists($instance, 'vtlib_handler')) clause and see what happens.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Saludos<div><br></div><div>Rubén</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 15, 2022 at 9:45 AM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is a bit odd.<br>
<br>
When I enable/disable a module in the Module Manager, ultimately the <br>
above static method is called:<br>
<br>
>       static function fireEvent($modulename, $event_type) {<br>
>               $instance = self::getClassInstance((string)$modulename);<br>
>               if($instance) {<br>
>                       if(method_exists($instance, 'vtlib_handler')) {<br>
>                               self::log("Invoking vtlib_handler for $event_type ...START");<br>
>                               $instance->vtlib_handler((string)$modulename, (string)$event_type);<br>
>                               self::log("Invoking vtlib_handler for $event_type ...DONE");<br>
>                       }<br>
>               }<br>
>       }<br>
<br>
I noticed that the module enable and disable events in my module's class <br>
file were not being triggered when I clicked on the checkbox.<br>
<br>
Adding some debugging statements the code gets as far as the <br>
method_exists() test but the next log statement never gets written and <br>
the vtlib_handler isn't called.<br>
<br>
The $instance is an Instance of the correct module. And the class file <br>
is fine in the sense that it loads with no errors etc. And I can view <br>
records in the crm...<br>
<br>
Anyone come across this before?<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div>