Hello,
I just updated to 1.1.0 and it immediately broke a plugin I wrote. This plugin has been working fine with prior releases tested up to 1.0.5.
My plugin adds a button to the top taskbar. When clicked, the plugin makes an ajax call to fetch the page contents. Nothing special. However, I am seeing logfile entries like this:
[18-Mar-2015 15:53:36 -0700]: <ghaptvr2> PHP Error: No handler found for action plugin.request_ajax in /usr/share/roundcubemail/program/lib/Roundcube/rcube_plugin_api.php on line 463 (POST /?_task=quarantine&_action=plugin.request_ajax?_task=&_action=)
Please note the duplicate _task and _action querystring variable.
Again, this plugin has been working fine, tested through 1.0.5. Here are some code snippets
/* CLASS FILE */
# Only Register Actions if we have chosen Quarantine from the Taskbar
if( $this->rcmail->task == 'quarantine' ) {
$this->register_action( 'plugin.request_ajax', array( $this, 'request_handler' ) );
}
function register_icon() {
# Load Icon Stylesheet
$this->include_stylesheet( 'styles/amacube_remix_quarantine.icon.css' );
# Add Quarantine Icon to the Taskbar
$this->add_button( array(
'command' => 'quarantine',
'class' => 'button-quarantine',
'classsel' => 'button-quarantine button-selected',
'innerclass' => 'button-inner',
'label' => 'quarantine',
'domain' => 'amacube_remix_quarantine'
), 'taskbar' );
}
/* JAVASCRIPT */
// Register Event Listeners
rcmail.addEventListener( 'plugin.response_messagelist', response_messagelist );
rcmail.addEventListener( 'init', function( evt ) {
// Populate Quarantine Table
rcmail.http_post( 'plugin.request_ajax', { action: 'show_quarantine', settings: settings } );
});
As you can see from the code, I am only registering the plugin.request_handler action when the task variable is set to quarantine. However, since the URL began appending an additional *empty* _task var, the action is never registered.
Help?