Author Topic: Calendar Not Functioning After Update To 1.3.0  (Read 2546 times)

Offline runit1012

  • Newbie
  • *
  • Posts: 5
Calendar Not Functioning After Update To 1.3.0
« on: August 07, 2017, 12:21:42 PM »
So I wend ahead and updated Roundcube to 1.3 last night and had very minimal issues. Unfortunately, I can't seem to get calendar back up and running correctly. After the update I just get a white screen in the browser when I open calendar. The error in the log associated with this is:

[07-Aug-2017 18:05:26 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined method jqueryui::get_color_values() in E:\xampp\htdocs\plugins\calendar\calendar.php:310
Stack trace:
#0 E:\xampp\htdocs\program\lib\Roundcube\rcube_plugin_api.php(491): calendar->calendar_view()
#1 E:\xampp\htdocs\index.php(295): rcube_plugin_api->exec_action('calendar.index')
#2 {main}
  thrown in E:\xampp\htdocs\plugins\calendar\calendar.php on line 310
[07-Aug-2017 18:05:29 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined method jqueryui::get_color_values() in E:\xampp\htdocs\plugins\calendar\calendar.php:310
Stack trace:
#0 E:\xampp\htdocs\program\lib\Roundcube\rcube_plugin_api.php(491): calendar->calendar_view()
#1 E:\xampp\htdocs\index.php(295): rcube_plugin_api->exec_action('calendar.index')
#2 {main}
  thrown in E:\xampp\htdocs\plugins\calendar\calendar.php on line 310

Now... I have gone in and deleted line 310 from the calendar.php file which allows the plugin to run correctly, but the background colors do not exist in the sliding windows which makes for a very poor visual experience.

Any ideas would be awesome. I'm stuck on this and really don't want to have to downgrade just for backgrounds in calendar.

Thank You,
Steve

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,405
    • http://SKaero.com/
Re: Calendar Not Functioning After Update To 1.3.0
« Reply #1 on: August 07, 2017, 01:17:50 PM »
Did you update the calendar plugin?

Offline idswizzard

  • Newbie
  • *
  • Posts: 1
Re: Calendar Not Functioning After Update To 1.3.0
« Reply #2 on: June 15, 2018, 01:38:08 PM »
Found a good solution...  in the jqueryui.php file in the plugins, add the following before the last } in the file:

    /**
     * Return a (limited) list of color values to be used for calendar and category coloring
     *
     * @return mixed List for colors as hex values or false if no presets should be shown
     */
    public static function get_color_values()
    {
        // selection from http://msdn.microsoft.com/en-us/library/aa358802%28v=VS.85%29.aspx
        return array('000000','006400','2F4F4F','800000','808000','008000',
            '008080','000080','800080','4B0082','191970','8B0000','008B8B',
            '00008B','8B008B','556B2F','8B4513','228B22','6B8E23','2E8B57',
            'B8860B','483D8B','A0522D','0000CD','A52A2A','00CED1','696969',
            '20B2AA','9400D3','B22222','C71585','3CB371','D2691E','DC143C',
            'DAA520','00FA9A','4682B4','7CFC00','9932CC','FF0000','FF4500',
            'FF8C00','FFA500','FFD700','FFFF00','9ACD32','32CD32','00FF00',
            '00FF7F','00FFFF','5F9EA0','00BFFF','0000FF','FF00FF','808080',
            '708090','CD853F','8A2BE2','778899','FF1493','48D1CC','1E90FF',
            '40E0D0','4169E1','6A5ACD','BDB76B','BA55D3','CD5C5C','ADFF2F',
            '66CDAA','FF6347','8FBC8B','DA70D6','BC8F8F','9370DB','DB7093',
            'FF7F50','6495ED','A9A9A9','F4A460','7B68EE','D2B48C','E9967A',
            'DEB887','FF69B4','FA8072','F08080','EE82EE','87CEEB','FFA07A',
            'F0E68C','DDA0DD','90EE90','7FFFD4','C0C0C0','87CEFA','B0C4DE',
            '98FB98','ADD8E6','B0E0E6','D8BFD8','EEE8AA','AFEEEE','D3D3D3',
            'FFDEAD'
        );
    }