Junk Policy and Autoreply not configureable
schickel007 opened this issue · 3 comments
Hi!
On Ubuntu 16.04 (with PHP7), ISPConfig 3.1b1 and Roundcube 1.2 (not from the ubuntu repositories) (plugin jqueryui is the first in the plugin array) I can't change the "Junk Policy" and it does not show any of available policies (see screenshot).
Available Policies in ISPConfig:
And if I deactivate "Move Spam Emails to Junk directory" and klick on "Save", I got this error message in Roundcube:
"Soap Error: autoresponder_end_date_isgreater"
Also "Autoresponder" show nothing, it does not load the setting. Error log in Roundcube shows only this:
Stack Trace:
#0 /var/www/roundcubemail/plugins/ispconfig3_autoreply/ispconfig3_autoreply.php(138): DateTime->__construct('@')
#1 /var/www/roundcubemail/program/include/rcmail_output_html.php(1127): ispconfig3_autoreply->gen_form(Array)
#2 [internal function]: rcmail_output_html->xml_command(Array)
#3 /var/www/roundcubemail/program/include/rcmail_output_html.php(1004): preg_replace_callback('/<roundcube:([-...', Array, '<!DOCTYPE html ...')
#4 /var/www/roundcubemail/program/include/rcmail_output_html.php(619): rcmail_output_html->parse_xml('<!DOCTYPE html ...')
#5 /var/www/roundcubemail/program/include/rcmail_output_html.php(478): rcmail_output_html->parse('autoreply', false)
#6 /var/www/roundcubemail/plugins/ispconfig3_autoreply/ispconfig3_autoreply.php(40): rcmail_output_html->send('ispconfig3_auto...')
#7 /var in /var/www/roundcubemail/plugins/ispconfig3_autoreply/ispconfig3_autoreply.php on line 138
And generally on every klick in roundcube, does no matter where, in the error log are these warnings:
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_account::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_account/ispconfig3_account.php on line 0
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_autoselect::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_autoselect/ispconfig3_autoselect.php on line 0
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_pass::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_pass/ispconfig3_pass.php on line 0
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_fetchmail::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_fetchmail/ispconfig3_fetchmail.php on line 0
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_filter::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_filter/ispconfig3_filter.php on line 0
[09-Jun-2016 10:43:51 Europe/Berlin] PHP Warning: Declaration of ispconfig3_wblist::load_config() should be compatible with rcube_plugin::load_config($fname = 'config.inc...') in /var/www/roundcubemail/plugins/ispconfig3_wblist/ispconfig3_wblist.php on line 0
Possibly the problem is related to the custom load_config function in ispconfig3_account.php. This might either need adapting to fit with how Roundcube wants it, or possibly could be removed if we use Roundcube's load_config function.
I haven't tried it yet though, and don't have the time right now.
PHP7 enforced stricter guidelines for the declaration of methods. As our load_config() method had a different signature than the equally-named method in rcube_plugin, the warning was emitted. This was now fixed in Commit aa76743. In the future, it seems reasonable to better rely on Roundcube's implementation.
The rest of this issue is indeed strongly linked with #57, so I going to provide a more detailed answer there.