More info here https://github.com/johndoh/roundcube-sauserprefs/issues/72 https://github.com/johndoh/roundcube-sauserprefs/issues/73 diff -ruN sauserprefs-original/config.inc.php sauserprefs/config.inc.php --- sauserprefs-original/config.inc.php 2022-10-28 18:21:08.067404158 +0200 +++ sauserprefs/config.inc.php 2022-10-28 18:16:49.105235594 +0200 @@ -73,7 +73,7 @@ // Some configs have been renamed in SAv4, old config names are depreciated // see https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7826 for more info // setting this config to true will make this plugin use the new config names -$config['sauserprefs_sav4'] = false; +$config['sauserprefs_sav4'] = true; // default settings // these are overridden by $GLOBAL and user settings from the database diff -ruN sauserprefs-original/sauserprefs.js sauserprefs/sauserprefs.js --- sauserprefs-original/sauserprefs.js 2022-06-18 09:15:24.000000000 +0200 +++ sauserprefs/sauserprefs.js 2022-10-28 18:11:17.221297366 +0200 @@ -359,8 +359,8 @@ $(obj).parents('thead').first().find('th').removeClass(rcmail.env.sauserprefs_table_sort_asc).removeClass(rcmail.env.sauserprefs_table_sort_desc); $(obj).parent('th').addClass(asc ? rcmail.env.sauserprefs_table_sort_asc : rcmail.env.sauserprefs_table_sort_desc); - rcmail.env.sauserprefs_sort[id] = [idx, asc]; - rcmail.save_pref({name: 'sauserprefs_sort', value: rcmail.env.sauserprefs_sort, env: true}); + rcmail.env.sauserprefs_sort[id] = [idx, asc.toString()]; + rcmail.save_pref({name: 'sauserprefs_sort', value: JSON.stringify(rcmail.env.sauserprefs_sort), env: true}); return false; }, true); @@ -379,4 +379,4 @@ } } } -}); \ No newline at end of file +}); diff -ruN sauserprefs-original/sauserprefs.php sauserprefs/sauserprefs.php --- sauserprefs-original/sauserprefs.php 2022-06-18 09:15:24.000000000 +0200 +++ sauserprefs/sauserprefs.php 2022-10-28 18:20:08.757594797 +0200 @@ -86,6 +86,9 @@ $this->load_config(); $this->_load_host_config(); + // set SpamAssassin v4 mode (added v1.20) + self::$SAv4 = $this->rcube->config->get('sauserprefs_sav4', false); + // Host exceptions $hosts = $this->rcube->config->get('sauserprefs_allowed_hosts'); if (!empty($hosts) && !in_array($_SESSION['storage_host'], (array) $hosts)) { @@ -257,7 +260,8 @@ 'sauserprefs.selectimportsource', 'import'); // output table sorting prefs - $sorts = $this->rcube->config->get('sauserprefs_sort', []); + $sorts = $this->rcube->config->get('sauserprefs_sort'); + $sorts = json_decode($sorts, true); if (!isset($sorts['#spam-langs-table'])) { $sorts['#spam-langs-table'] = [0, 'true']; } @@ -1460,8 +1464,5 @@ $file = $configs[$_SESSION['storage_host']]; $this->load_config($file); - - // set SpamAssassin v4 mode (added v1.20) - self::$SAv4 = $this->rcube->config->get('sauserprefs_sav4', false); } }