[Pkg-roundcube-maintainers] Bug#1053452: The packaged plugin "keyboard_shortcuts" does not work with roundcube v1.6.1

Dmitry Katsubo dma_k at mail.ru
Wed Oct 4 12:34:34 BST 2023


Package: roundcube-plugins-extra
Version: 1.4.10+1-4

The plugin "keyboard_shortcuts" should be either fixed or replaced with another plugin.

Error log:

=== cut ===
[03-Oct-2023 17:23:13 UTC] PHP Warning:  Undefined property: rcmail::$imap in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php on line 104
[03-Oct-2023 17:23:13 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method rcmail::imap_connect() in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php:105
Stack trace:
#0 /usr/share/roundcube/program/lib/Roundcube/rcube_plugin_api.php(518): keyboard_shortcuts->html_output()
#1 /usr/share/roundcube/program/include/rcmail_output_html.php(1456): rcube_plugin_api->exec_hook()
#2 [internal function]: rcmail_output_html->xml_command()
#3 /usr/share/roundcube/program/include/rcmail_output_html.php(1322): preg_replace_callback()
#4 /usr/share/roundcube/program/include/rcmail_output_html.php(825): rcmail_output_html->parse_xml()
#5 /usr/share/roundcube/program/include/rcmail_output_html.php(654): rcmail_output_html->parse()
#6 /usr/share/roundcube/program/include/rcmail.php(296): rcmail_output_html->send()
#7 /usr/share/roundcube/index.php(278): rcmail->action_handler()
#8 {main}
  thrown in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php on line 105

[04-Oct-2023 10:19:41 UTC] PHP Warning:  Undefined property: rcmail::$imap in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php on line 104
[04-Oct-2023 10:19:41 UTC] PHP Warning:  Undefined property: rcmail::$imap in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php on line 107

[04-Oct-2023 10:19:41 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_capability() on null in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php:107
Stack trace:
#0 /usr/share/roundcube/program/lib/Roundcube/rcube_plugin_api.php(518): keyboard_shortcuts->html_output()
#1 /usr/share/roundcube/program/include/rcmail_output_html.php(1456): rcube_plugin_api->exec_hook()
#2 [internal function]: rcmail_output_html->xml_command()
#3 /usr/share/roundcube/program/include/rcmail_output_html.php(1322): preg_replace_callback()
#4 /usr/share/roundcube/program/include/rcmail_output_html.php(825): rcmail_output_html->parse_xml()
#5 /usr/share/roundcube/program/include/rcmail_output_html.php(654): rcmail_output_html->parse()
#6 /usr/share/roundcube/program/include/rcmail.php(296): rcmail_output_html->send()
#7 /usr/share/roundcube/index.php(278): rcmail->action_handler()
#8 {main}
  thrown in /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php on line 107
=== cut ===

The following patch solves the critical issues:

=== cut ===
--- /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php.orig    2023-10-04 12:19:19.182581433 +0200
+++ /usr/share/roundcube/plugins/keyboard_shortcuts/keyboard_shortcuts.php 2023-10-04 12:31:59.561591110 +0200
@@ -101,12 +101,12 @@
         $c .= "<div class='shortcut_key'> </div> <br class='clear' />";
         $c .= "</div>";

-        if(!is_object($rcmail->imap)){
-          $rcmail->imap_connect();
+        if(!is_object($rcmail->storage)){
+          $rcmail->storage_connect();
         }
-        $threading_supported = $rcmail->imap->get_capability('thread=references')
-          || $rcmail->imap->get_capability('thread=orderedsubject')
-          || $rcmail->imap->get_capability('thread=refs');
+        $threading_supported = $rcmail->storage->get_capability('thread=references')
+          || $rcmail->storage->get_capability('thread=orderedsubject')
+          || $rcmail->storage->get_capability('thread=refs');

         if ($threading_supported) {
           $c .= "<div><h4>".$this->gettext("threads")."</h4>";
=== cut ===


-- 
With best regards,
Dmitry



More information about the Pkg-roundcube-maintainers mailing list