Author Topic: Help: No handler found for action plugin.my_function  (Read 8162 times)

Offline Prog

  • Newbie
  • *
  • Posts: 2
Help: No handler found for action plugin.my_function
« on: November 09, 2009, 03:27:01 PM »
Hello all

I'm making a new plugin (called 'lfilter'). Im getting the message :

"No handler found for action plugin.lfilter-save"

I'm tired of finding errors / compare the codes  :confused:

lfilter.js has the code


if (window.rcmail) {
   rcmail.addEventListener('init',
      function(evt) {
         var tab = $('').attr('id', 'settingstabpluginlfilter').addClass('tablink');
         var button = $('').attr('href', rcmail.env.comm_path+'&_action=plugin.lfilter')
                              .html(rcmail.gettext('lfilter', 'lfilter')).appendTo(tab);
         button.bind('click', function(e){ return rcmail.command('plugin.lfilter', this) });
         rcmail.add_element(tab, 'tabs');
         rcmail.register_command('plugin.lfilter', function(){ rcmail.goto_url('plugin.lfilter') }, true);
     
         rcmail.register_command('plugin.lfilter-save', function(){  rcmail.goto_url('plugin.lfilter') }, true);

      }
   );

}




lfilter.php


   function init() {
      $this->add_hook('render_mailboxlist', array($this, 'lf_move_messages'));
      $this->add_texts('localization/', array('lfilter'));
      $this->register_action('plugin.lfilter', array($this, 'lfilter_init'));
      $this->register_action('plugin.lfilter-save ', array($this, 'lfilter_save'));
      $this->include_script('lfilter.js');
   }


   function lfilter_init() {
      $this->register_handler('plugin.body', array($this, 'lfilter_body'));
      $this->register_handler('plugin.lfilter-save ', array($this, 'lfilter_save'));
      rcmail::get_instance()->output->send('plugin');
   }


Its not all?? What else is there to do?

Thx for any help

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Help: No handler found for action plugin.my_function
« Reply #1 on: November 10, 2009, 01:08:38 AM »
$this->register_action('plugin.lfilter-save ', array($this, 'lfilter_save'));

... do you really have this wrong space 'plugin.lfilter-save[wrong space]' ???
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Prog

  • Newbie
  • *
  • Posts: 2
Solved!! Thx
« Reply #2 on: November 10, 2009, 06:57:15 AM »
:o
I dont believe...

I have lost o lot of time checking this code.
I thought it was a logical error...

lol...

Sorry for a newbie error  :D

Thanks very much for your atention!