[Vtigercrm-developers] Anyone found issues with vtlib Vtiger_Module::fireEvent()
Rubén A. Estrada Orozco
rulotec1 at gmail.com
Mon Aug 15 16:03:32 GMT 2022
>From what you say, it seems to me that, for some
reason, method_exists($instance, 'vtlib_handler') is returning false.
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.
Saludos
Rubén
On Mon, Aug 15, 2022 at 9:45 AM Alan Lord <alanslists at gmail.com> wrote:
> This is a bit odd.
>
> When I enable/disable a module in the Module Manager, ultimately the
> above static method is called:
>
> > static function fireEvent($modulename, $event_type) {
> > $instance = self::getClassInstance((string)$modulename);
> > if($instance) {
> > if(method_exists($instance, 'vtlib_handler')) {
> > self::log("Invoking vtlib_handler for
> $event_type ...START");
> >
> $instance->vtlib_handler((string)$modulename, (string)$event_type);
> > self::log("Invoking vtlib_handler for
> $event_type ...DONE");
> > }
> > }
> > }
>
> I noticed that the module enable and disable events in my module's class
> file were not being triggered when I clicked on the checkbox.
>
> Adding some debugging statements the code gets as far as the
> method_exists() test but the next log statement never gets written and
> the vtlib_handler isn't called.
>
> The $instance is an Instance of the correct module. And the class file
> is fine in the sense that it loads with no errors etc. And I can view
> records in the crm...
>
> Anyone come across this before?
>
> Cheers
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220815/2a6ad973/attachment.html>
More information about the vtigercrm-developers
mailing list