keyboard_shortcuts plugin is unloadable due to misnamed directory

Bug #1641730 reported by Dara Poon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
roundcube-plugins-extra (Ubuntu)
New
Undecided
Unassigned

Bug Description

The name of the directory containing each plugin must match the name of its primary PHP file. This is according to /usr/share/roundcube/program/lib/Roundcube/rcube_plugin_api.php, line 168 (in the load_plugin() method):

            $fn = "$plugins_dir/$plugin_name/$plugin_name.php";

… and line 194:

            $plugin = new $plugin_name($this);

However, roundcube-plugins-extra-1.1.3-20151025 (part of 16.04 LTS) installs

    /var/lib/roundcube/plugins/keyboard-shortcuts/keyboard_shortcuts.php

… which defines a keyboard_shortcuts class. The mismatch between "keyboard-shortcuts" and "keyboard_shorcuts" makes it impossible to load the keyboard_shortcuts plugin. The directory name must be changed to use an underscore, since the hyphen is not part of a valid PHP class name.

Workaround:

    sudo ln -s keyboard-shortcuts /var/lib/roundcube/plugins/keyboard_shortcuts

Revision history for this message
Dara Poon (dpoon) wrote :

Other plugins are similarly affected:

$ dpkg -S /usr/share/roundcube/plugins/*-*
roundcube-plugins-extra: /usr/share/roundcube/plugins/compose-addressbook
roundcube-plugins-extra: /usr/share/roundcube/plugins/dovecot-impersonate
roundcube-plugins-extra: /usr/share/roundcube/plugins/keyboard-shortcuts
roundcube-plugins-extra: /usr/share/roundcube/plugins/message-highlight
roundcube-plugins-extra: /usr/share/roundcube/plugins/thunderbird-labels

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.