6.0.0-beta1
8/9/25

[#345] Bug in displaying first and last message of a mailbox
Summary Bug in displaying first and last message of a mailbox
Queue IMP
Queue Version 3.2.4
Type Bug
State Not A Bug
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester wizard (at) gmx (dot) fr
Created 07/01/2004 (7709 days ago)
Due
Updated 08/27/2004 (7652 days ago)
Assigned 07/13/2004 (7697 days ago)
Resolved 07/24/2004 (7686 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/27/2004 08:39:13 AM download (at) ssw (dot) co (dot) at Comment #8 Reply to this comment
Hi there!

I'm experiencing the same problem with error 'Notice: Undefined index: 
10 in /opt/lampp/htdocs/horde/imp/message.php on line 271'

Display of 'INBOX: Subject (1/0)' doesn't work!

I get following values at debugging at line 269 ($sorted = 
IMP_Message::range($sorted, $array_index + $imp['offset'] + 1, 
$imp['offset'], $array_index, $imp['msgcount']);) :

         print $imp['offset'];      //prints 0

         print $imp['msgcount'];    //prints 0

         print count($sorted);      //prints 0



I am using Exchange Server 2003, read sometimes there is a problem 
with IMAP (using IMAP4), but wouldn't know what to change. OE6 works 
correct with IMAP.

Using PHP4, Apache/2.0.50, Horde 2.2.5, IMP 3.2.3



Really hope, someone can help me.

Rainer



P.S. Solution with commenting out 2 lines works, but I doubt that it's 
a good solution (also sorting of messages still doesn't work)




07/26/2004 01:13:44 PM   Comment #7
New Attachment: Sans titre.JPG Download
Reply to this comment
Sorry but I was in vacation...



The bug appears with the following configuration :

     'protocol' => 'imap/ssl',

     'port' => 993,

     'folders' => 'INBOX.',

     'namespace' => '',

     'realm' => '',

     'preferred' => ''



I have attached a screenshot of bugging page.



If you want, I can create an IMAP account for you to test my Horde server.
07/26/2004 01:13:43 PM wizard (at) gmx (dot) fr Comment #6 Reply to this comment
Sorry but I was in vacation...



The bug appears with the following configuration :

     'protocol' => 'imap/ssl',

     'port' => 993,

     'folders' => 'INBOX.',

     'namespace' => '',

     'realm' => '',

     'preferred' => ''



I have attached a screenshot of bugging page.



If you want, I can create an IMAP account for you to test my Horde server.
07/24/2004 05:02:18 AM Chuck Hagenbuch Comment #5
State ⇒ Not A Bug
Reply to this comment
No feedback.
07/13/2004 08:54:35 PM Chuck Hagenbuch Comment #4
State ⇒ Feedback
Reply to this comment
It does it to see if there are any more messages since it's reached 
the end of its current mailbox slice.



I can't reproduce this. You'll have to debug it yourself, or give me 
something else to go on - are you using pop3? etc...
07/12/2004 08:46:45 AM Jan Schneider Assigned to Chuck Hagenbuch
Priority ⇒ 1. Low
State ⇒ Assigned
 
07/01/2004 08:37:22 AM wizard (at) gmx (dot) fr Comment #3 Reply to this comment
It appears on mailbox all the time. Look at the index number near the 
subject message when opening the first and last message of your 
mailbox. You will read : (1 of 0) but normally it would be (1 of total 
msg) for the first and (total msg of total msg) for the last. That's 
what I have.



And more, I don't understand why the script goes in the if condition 
described in my last post for only first and last message.



Thanks.
07/01/2004 03:13:52 AM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
I doubt this is really the right solution. When does this happen? All 
the time, all mailboxes, reliably under any circumstances, etc.?
07/01/2004 12:18:22 AM wizard (at) gmx (dot) fr Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Queue ⇒ IMP
State ⇒ Unconfirmed
Reply to this comment
The current message number and the total count for the first and last 
message are erroneous.



The following Notice appears : Undefined index: 1 in 
/home/erevenu/www-horde/horde/imp/message.php on line 271.



Solution is to remove two lines from message.php :



(line : 247)

if ($imp['mailbox'] != '**search') {

     if (!$uidsvalid ||

// REMOVE THIS //        $array_index == count($sorted) + 1 ||

// REMOVE THIS //       $array_index == 0 ||

         (($actionID == DELETE_MESSAGES || $actionID == MOVE_MESSAGES 
|| $actionID == COPY_MESSAGES) &&

          ($array_index == count($sorted) - 2))) {



         if ($prefs->getValue('sortby') != SORTTHREAD) {

             if ($prefs->getValue('delhide')) {

                 $sorted = imap_sort($imp['stream'], 
$prefs->getValue('sortby'),

                                     $prefs->getValue('sortdir'), 
SE_UID, 'UNDELETED');

             } else {

                 $sorted = imap_sort($imp['stream'], 
$prefs->getValue('sortby'),

                                     $prefs->getValue('sortdir'), SE_UID);

             }

         } else {

             IMP_Message::threadSort();

         }



         $sorted = IMP_Message::range($sorted, $array_index + 
$imp['offset'] + 1,

                                      $imp['offset'], $array_index, 
$imp['msgcount']);

         $imp['msgl'] = implode(':', $sorted);

         $sorted = explode(':', $imp['msgl']);

         $indices = array_flip($sorted);

         $array_index = $indices[$index];

     }

}


Saved Queries