Summary | Missing folders with servers that don't uppercase 'INBOX' |
Queue | IMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | imp (at) oak-wood (dot) co (dot) uk |
Created | 05/20/2004 (7714 days ago) |
Due | |
Updated | 02/27/2005 (7431 days ago) |
Assigned | 02/18/2005 (7440 days ago) |
Resolved | 02/27/2005 (7431 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Feedback
Notice: Undefined index: a in
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1115
then you need to make sure you are completely up-to-date with the
latest version of the RELENG releases as this error was fixed several
weeks ago. If you are not up-to-date with RELENG, than my patch
obviously isn't going to show any results.
Notice: Undefined index: a in
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1115
Another more minor issue related to this is that in the mail block on
the horde main page I have both 'Inbox' and 'INBOX' listed.
Assigned to Michael Slusarz
Taken from
State ⇒ Feedback
diff for the 3.0.x branch:
http://cvs.horde.org/diff.php/framework/IMAP/IMAP/Tree.php?r1=1.53&r2=1.54&ty=u
Array
(
[Inbox] => stdClass Object
(
[name] => Inbox
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Inbox
)
[chris] => stdClass Object
(
[name] => chris
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}chris
)
[accounts] => stdClass Object
(
[name] => accounts
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}accounts
)
[info] => stdClass Object
(
[name] => info
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}info
)
[webmaster] => stdClass Object
(
[name] => webmaster
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}webmaster
)
[c.hastie] => stdClass Object
(
[name] => c.hastie
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}c.hastie
)
[Stallions] => stdClass Object
(
[name] => Stallions
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Stallions
)
[Tipi mail] => stdClass Object
(
[name] => Tipi mail
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Tipi mail
)
[SilkThreads] => stdClass Object
(
[name] => SilkThreads
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}SilkThreads
)
[No spam] => stdClass Object
(
[name] => No spam
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}No spam
)
[tipichris@bigfoot.com] => stdClass Object
(
[name] => tipichris@bigfoot.com
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}tipichris@bigfoot.com
)
[Postmaster] => stdClass Object
(
[name] => Postmaster
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Postmaster
)
[uktc-owner] => stdClass Object
(
[name] => uktc-owner
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}uktc-owner
)
[turtle@bigwig.net] => stdClass Object
(
[name] => turtle@bigwig.net
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}turtle@bigwig.net
)
[chris.hastie] => stdClass Object
(
[name] => chris.hastie
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}chris.hastie
)
[Filed] => stdClass Object
(
[name] => Filed
[attributes] => 64
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Filed
)
[Wastebasket] => stdClass Object
(
[name] => Wastebasket
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Wastebasket
)
[Drafts] => stdClass Object
(
[name] => Drafts
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Drafts
)
[Outbox] => stdClass Object
(
[name] => Outbox
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Outbox
)
[News] => stdClass Object
(
[name] => News
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}News
)
[MailingLists] => stdClass Object
(
[name] => MailingLists
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}MailingLists
)
[Searches] => stdClass Object
(
[name] => Searches
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Searches
)
[tangwen-sysadmin] => stdClass Object
(
[name] => tangwen-sysadmin
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}tangwen-sysadmin
)
[Trash] => stdClass Object
(
[name] => Trash
[attributes] => 64
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Trash
)
[Wedding] => stdClass Object
(
[name] => Wedding
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Wedding
)
[Root] => stdClass Object
(
[name] => Root
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Root
)
[Virus Alerts] => stdClass Object
(
[name] => Virus Alerts
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Virus Alerts
)
[VirusSamples] => stdClass Object
(
[name] => VirusSamples
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}VirusSamples
)
[duff_stuff] => stdClass Object
(
[name] => duff_stuff
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}duff_stuff
)
[Spam] => stdClass Object
(
[name] => Spam
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Spam
)
[Sent Items] => stdClass Object
(
[name] => Sent Items
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Sent Items
)
[Warwickdc] => stdClass Object
(
[name] => Warwickdc
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}Warwickdc
)
[sent-mail] => stdClass Object
(
[name] => sent-mail
[attributes] => 64
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}sent-mail
)
[trash] => stdClass Object
(
[name] => trash
[attributes] => 64
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}trash
)
[Sent] => stdClass Object
(
[name] => Sent
[attributes] => 64
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Sent
)
[{4F17E540-8EB7-11d2-97A7-00A024A82FF3}] => stdClass Object
(
[name] => {4F17E540-8EB7-11d2-97A7-00A024A82FF3}
[attributes] => 32
[delimiter] => /
[fullServerPath] =>
{celandine.oak-wood.co.uk:143/imap/notls}{4F17E540-8EB7-11d2-97A7-00A024A82FF3}
)
[INBOX] => stdClass Object
(
[name] => Inbox
[attributes] => 32
[delimiter] => /
[fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Inbox
)
)
print_r($boxes)
on line 147 and tell me what it returns?
server with the mixed case Inbox I get this in the menu bar:
Notice: Undefined index: a in
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1106
Don't know if it's related, or just a config option I've missed, but I
don't see it on servers with INBOX.
need a milestone feature in Whups?
I'm pretty sure, though, that c-client doesn't touch the case.
'INBOX' checks in IMP to instead use strcasecmp() instead? Or does
c-client automatically convert the INBOX mailbox name to all uppercase
and, therefore, the reason we have not really run into any problems
with this in the past?
State ⇒ Feedback
Priority ⇒ 2. Medium
State ⇒ Assigned
Taken from Michael Slusarz
Assigned to Michael Slusarz
Priority ⇒ 2. Medium
State ⇒ Assigned
on the face of it. But I'm not convinced it will be consistent, and it
throws up other problems.
An additional 'INBOX' element is still be inserted. Providing the sort
results in 'INBOX' appearing before 'Inbox' I will see only 'Inbox' in
the tree, which is the way I need it as only 'Inbox' contains
sub-folders. But if the sort reverses the order of Inbox and INBOX
I'll see both in the tree.
The drop down list of folders and the check boxes on the search page
now include both INBOX and Inbox, both at the top of the list, and
NEITHER has any sub-folders showing. These appear to have been moved
to another folder, the neighbour of 'Inbox' had the sorting been
strictly alphabetical.
The fundamental problem seems to be that various libraries assume that
'INBOX' will always be upper case, and that if no folder with the
upper case name 'INBOX' exists, one is added to the tree.
have time to look it up right now), we shouldn't convert it to any
casing, but ignore the case when sorting the tree instead.
Try the attached patch and see if it fixes the sorting for you.
Priority ⇒ 2. Medium
New Attachment: imap-sort.diff
have time to look it up right now), we shouldn't convert it to any
casing, but ignore the case when sorting the tree instead.
Try the attached patch and see if it fixes the sorting for you.
Priority ⇒ 3. High
Assigned to Jan Schneider
Priority ⇒ 3. High
Type ⇒ Bug
Queue ⇒ IMP
State ⇒ Unconfirmed
not include any that are alphabetically before 'Inbox'.
IMP_Tree::_init() creates an INBOX if none exists. However, the name
of this will be set to 'Inbox'. Consequently, the value of
IMP_Tree->_first is set to 'Inbox' so that when IMP_Tree::reset() is
called it moves to 'Inbox', not 'INBOX'.
Since RFC3501 is specific about INBOX being case insensitive, IMP_Tree
and IMAP_Tree need to handle the used of mixed case in this folder name.
This kludge for IMP_Tree gets all the folders showing:
--- Tree.php.orig Fri May 14 21:03:07 2004
+++ Tree.php Fri May 14 22:54:49 2004
@@ -72,6 +72,7 @@
if (!isset($boxes['INBOX'])) {
$boxes['INBOX'] = $this->_getMailbox('INBOX');
+ $boxes['INBOX']->name = 'INBOX';
}
/* Do a sort to make sure that 'INBOX' always appears as the first
However, this shows both an INBOX at the top of the tree and an Inbox
arranged alphabetically. Although both contain the same messages, only
Inbox contains sub-folders.
I did try to patch IMAP_Tree::_getList with this to canonicise to upper case:
--- Tree.php.orig Sun May 16 19:18:41 2004
+++ Tree.php Thu May 20 09:07:00 2004
@@ -341,6 +341,9 @@
/* Strip off server string. */
$box = $this->_removeServerString($box);
+ if (strtoupper($box->name) == 'INBOX' ) {
+ $box->name = 'INBOX';
+ }
$unique[$box->name] = $box;
}
}
but this resulted in none of the folders beneath INBOX in the
hierarchy showing.