Author Topic: Accounts Plugin has special folders bug  (Read 10449 times)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« on: April 28, 2011, 06:43:13 PM »
The accounts plugin (combined with patch 55) has problems with remembering the special folders settings on the primary imap account.

I installed the plugin, added all my accounts, then switch to each account and went to settings->special folders to set my folders.    As expected, they were all properly saved in the database.

The problem comes when you switch to a Gmail account, then back to the primary IMAP account.   It will then not have ANY special folders assigned.  Not only do you not see the special folders icons in the folder tree, but if you go to settings->special folders, they are all unassigned there as well.  

But the problem is not that they are missing from the database, because logging off and back in will bring them right back.  OR, you can switch to another local account and back to the primary account and suddenly they come back.

So, it seems the only time the problem shows up is if you switch back to the main account from a gmail account.

Does anyone else have this problem?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #1 on: April 29, 2011, 12:27:31 AM »
Which other plugins are active? Do you have the request_saver plugin enabled?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« Reply #2 on: April 29, 2011, 01:09:43 AM »
Quote from: rosali;34476
Which other plugins are active? Do you have the request_saver plugin enabled?


Here are the installed plugins.   no request_saver.

$rcmail_config['plugins'] = array('filesystem_attachments','automatic_addressbook','jqueryui','calendar','markasjunk',
'vcard_attachments','vcard_attach','archivefolder','google_contacts','settings','taskbar','sound_notifier','sticky_notes',
'msglistcols','remember_spliter','remember_me','emoticons','newuser','savepassword','remember_skin','password','accounts','message_highlight');

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #3 on: April 29, 2011, 01:18:12 AM »
I can't reproduce the issue. Works for me. Did you ever save your special folders for the default account?

I'm running accounts plugin without this patch for smtp hosts.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #4 on: April 29, 2011, 01:24:48 AM »
Could you post your main config file (private things can be masked)?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« Reply #5 on: April 29, 2011, 02:21:49 AM »
Quote from: rosali;34480
Could you post your main config file (private things can be masked)?


Sure, here it is, I had to strip out the comments so it would be small enough for the forum to accept...

Code: [Select]

<?php


$rcmail_config 
= array();

$rcmail_config['debug_level'] = 2;

$rcmail_config['log_driver'] = 'file';

$rcmail_config['log_date_format'] = 'M/d/Y H:i:s O';

$rcmail_config['syslog_id'] = 'roundcube';

$rcmail_config['syslog_facility'] = LOG_USER;

$rcmail_config['smtp_log'] = true;

$rcmail_config['log_logins'] = true;

$rcmail_config['sql_debug'] = false;

$rcmail_config['imap_debug'] = false;

$rcmail_config['ldap_debug'] = false;

$rcmail_config['smtp_debug'] = false;

$rcmail_config['default_host'] = 'localhost';

$rcmail_config['default_port'] = 143;

$rcmail_config['imap_auth_type'] = null;

$rcmail_config['imap_delimiter'] = null;

$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;

$rcmail_config['imap_force_caps'] = false;

$rcmail_config['imap_force_lsub'] = false;

$rcmail_config['imap_timeout'] = 0;

$rcmail_config['imap_auth_cid'] = null;

$rcmail_config['imap_auth_pw'] = null;

$rcmail_config['smtp_server'] = 'localhost';

$rcmail_config['smtp_port'] = 25;

$rcmail_config['smtp_user'] = '%u';

$rcmail_config['smtp_pass'] = '%p';

$rcmail_config['smtp_auth_type'] = '';

$rcmail_config['smtp_auth_cid'] = null;

$rcmail_config['smtp_auth_pw'] = null;

$rcmail_config['smtp_helo_host'] = '';

$rcmail_config['smtp_timeout'] = 0;

$rcmail_config['enable_installer'] = false;

$rcmail_config['log_dir'] = 'logs/';

$rcmail_config['temp_dir'] = 'temp/';

$rcmail_config['enable_caching'] = false;

$rcmail_config['message_cache_lifetime'] = '10d';

$rcmail_config['force_https'] = false;

$rcmail_config['use_https'] = false;

$rcmail_config['login_autocomplete'] = 1;

$rcmail_config['login_lc'] = false;

$rcmail_config['auto_create_user'] = true;

$rcmail_config['skin_include_php'] = false;

$rcmail_config['session_lifetime'] = 10;

$rcmail_config['ip_check'] = true;

$rcmail_config['double_auth'] = false;

$rcmail_config['referer_check'] = false;

$rcmail_config['des_key'] = 'xxx';

$rcmail_config['username_domain'] = '%d';

$rcmail_config['mail_domain'] = '';

$rcmail_config['password_charset'] = 'ISO-8859-1';

$rcmail_config['sendmail_delay'] = 0;

$rcmail_config['max_recipients'] = 0

$rcmail_config['max_group_members'] = 0

$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;

$rcmail_config['product_name'] =  'Delta WebMail';

$rcmail_config['include_host_config'] = false;

$rcmail_config['generic_message_footer'] = '';

$rcmail_config['generic_message_footer_html'] = '';

$rcmail_config['http_received_header'] = false;

$rcmail_config['http_received_header_encrypt'] = false;

$rcmail_config['mail_header_delimiter'] = NULL;

$rcmail_config['line_length'] = 72;

$rcmail_config['send_format_flowed'] = true;

$rcmail_config['session_domain'] = '';

$rcmail_config['dont_override'] = array();

$rcmail_config['identities_level'] = 0;

$rcmail_config['mime_magic'] = '/usr/share/misc/magic';

$rcmail_config['email_dns_check'] = false;

$rcmail_config['plugins'] = array('filesystem_attachments','automatic_addressbook','jqueryui','calendar','markasjunk',
'vcard_attachments','vcard_attach','archivefolder','google_contacts','settings','taskbar','sound_notifier','sticky_notes',
'msglistcols','remember_spliter','remember_me','emoticons','newuser','savepassword','remember_skin','password','accounts','message_highlight');

$rcmail_config['message_sort_col'] = 'date';

$rcmail_config['message_sort_order'] = 'DESC';

$rcmail_config['list_cols'] = array('status','from','subject''date''size','flag''attachment');

$rcmail_config['language'] = 'en_US';

$rcmail_config['date_short'] = 'D H:i';

$rcmail_config['date_long'] = 'm/d/Y H:i';

$rcmail_config['date_today'] = 'H:i';

$rcmail_config['drafts_mbox'] = 'Drafts';

$rcmail_config['junk_mbox'] = 'Spam';

$rcmail_config['sent_mbox'] = 'Sent';

$rcmail_config['trash_mbox'] = 'Trash';

$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Spam''Trash','archives');

$rcmail_config['create_default_folders'] = true;

$rcmail_config['protect_default_folders'] = true;

$rcmail_config['quota_zero_as_unlimited'] = false;

$rcmail_config['enable_spellcheck'] = true;

$rcmail_config['spellcheck_engine'] = 'googie';

$rcmail_config['spellcheck_uri'] = '';

$rcmail_config['spellcheck_languages'] = NULL;

$rcmail_config['max_pagesize'] = 200;

$rcmail_config['min_keep_alive'] = 60;

$rcmail_config['address_book_type'] = 'sql';

$rcmail_config['ldap_public'] = array();

$rcmail_config['autocomplete_addressbooks'] = array('sql');

$rcmail_config['autocomplete_min_length'] = 1;

$rcmail_config['default_charset'] = 'ISO-8859-1';

$rcmail_config['skin'] = 'delta';

$rcmail_config['pagesize'] = 50;

$rcmail_config['timezone'] = 'auto';

$rcmail_config['dst_active'] = (bool)date('I');

$rcmail_config['prefer_html'] = true;

$rcmail_config['show_images'] = 1;

$rcmail_config['htmleditor'] = 1;

$rcmail_config['prettydate'] = true;

$rcmail_config['draft_autosave'] = 300;

$rcmail_config['preview_pane'] = true;

$rcmail_config['preview_pane_mark_read'] = 0;

$rcmail_config['focus_on_new_message'] = true;

$rcmail_config['logout_purge'] = false;

$rcmail_config['logout_expunge'] = false;

$rcmail_config['inline_images'] = true;

$rcmail_config['mime_param_folding'] = 1;

$rcmail_config['skip_deleted'] = false;

$rcmail_config['read_when_deleted'] = true;

$rcmail_config['flag_for_deletion'] = false;

$rcmail_config['keep_alive'] = 60;

$rcmail_config['check_all_folders'] = false;

$rcmail_config['display_next'] = true;

$rcmail_config['autoexpand_threads'] = 1;

$rcmail_config['top_posting'] = true;

$rcmail_config['strip_existing_sig'] = true;

$rcmail_config['show_sig'] = 1;

$rcmail_config['sig_above'] = false;

$rcmail_config['force_7bit'] = false;

$rcmail_config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));

$rcmail_config['delete_always'] = false;

$rcmail_config['mdn_requests'] = 0;

$rcmail_config['mdn_default'] = 0;

$rcmail_config['dsn_default'] = 0;

$rcmail_config['reply_same_folder'] = false;

// end of config file

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #6 on: April 29, 2011, 06:22:37 AM »
I have tried it again with your settings but still can't reproduce any issue.

Is it possible to get remote access (IMAP test account and FTP access to Roundcube root folder)?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« Reply #7 on: April 29, 2011, 04:59:37 PM »
Quote from: rosali;34491
I have tried it again with your settings but still can't reproduce any issue.

Is it possible to get remote access (IMAP test account and FTP access to Roundcube root folder)?


yes..  I just sent you a private message with the info.

Also, there are some additional problems that I didn't mention before.

1, unlike the main account, special folders do not automatically create and assign on the first login.

2. the identities are confused and often duplicate identities are created.

3. when going to settings->Account Administration  the initial page that loads before you click thru to the list of accounts is confusing, unnecessary, and I would like to find a way to bypass it if possible.   It doesn't provide any functionality, it is just an extra step to the list of accounts.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #8 on: April 29, 2011, 10:45:33 PM »
I'll look inside asap.

#1- It's intended. You can't know if another imap backend allows creation of folders.
#3- I won't change it. There are other plugins which use this section.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #9 on: April 29, 2011, 11:48:50 PM »
I can't reproduce #2.

The default folder issue should be fixed on your server. It didn't work for you as your server supports namespace and mine not. So I was not able to reproduce the issue.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« Reply #10 on: April 30, 2011, 12:01:29 AM »
Quote from: rosali;34499
I can't reproduce #2.

The default folder issue should be fixed on your server. It didn't work for you as your server supports namespace and mine not. So I was not able to reproduce the issue.


Thank you!!  It is working great now.

I should have been more clear about the identities.   So lets say my name is john doe and i have several email addresses,  I have john.doe@aaa.com and john.doe@bbb.com and john.doe@ccc.com

I want the name displayed on the messages to be john doe.   However, when select an account from the accounts list, I won't be able to tell which is which if they all just say john doe.  

Since the display name is used for both the name on the outbound emails and the name in the list, this presents a problem.  I think there needs to be two fields, one for name, and the other for display name.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #11 on: April 30, 2011, 12:24:02 AM »
Do you mean the display in the accounts selector or in the identities section?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Accounts Plugin has special folders bug
« Reply #12 on: April 30, 2011, 12:28:49 AM »
Quote from: rosali;34501
Do you mean the display in the accounts selector or in the identities section?


that is what I meant but now that I am looking at it again, I feel stupid..  The accounts selector is displaying the account name from account administration and the email is displaying the display name from identities.   This solves everything.

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Suggestion
« Reply #13 on: April 30, 2011, 12:48:14 AM »
I made a simple change that I think would be a nice improvement for everyone if you want to implement it in the next release.

In the modified code that you created on my server, on line 443  the block for

Code: [Select]
(if(count($accounts...

} else {
    return $p;
}


I added the else return $p.   I didn't see any reason to show the account selections when there isn't anything but the default account.   Many of my users won't have an additional account and that would be confusing.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Accounts Plugin has special folders bug
« Reply #14 on: April 30, 2011, 01:25:33 AM »
Yep, but I think it should display a span element with the username instead of the selector.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)