6.0.0-alpha14
7/3/25

[#7296] Mailbox sorting bugs
Summary Mailbox sorting bugs
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org, slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 09/06/2008 (6144 days ago)
Due
Updated 01/13/2010 (5650 days ago)
Assigned 03/31/2009 (5938 days ago)
Resolved 06/02/2009 (5875 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/13/2010 12:01:53 AM CVS Commit Comment #24 Reply to this comment
06/08/2009 06:15:42 PM Michael Slusarz Comment #23 Reply to this comment

[Show Quoted Text - 11 lines]
The old IMP conversion scripts used to loop through a list of 
usernames to switch the pref backend as necessary.  And if you (as an 
admin) can not access the pref backends of any user, your system 
probably isn't setup very well.  I can't even begin to imagine how you 
can be expected to manage a pref backend without full admin access...



Regardless, this conversion is done at run-time in the instant case, 
so further discussion within the context of this ticket is irrelevant.
06/02/2009 09:59:14 PM Michael Rubinsky Comment #22 Reply to this comment
That would usually done by a maintenance task like the one-time task
in Turba.
I disagree.  Maintenance tasks are OK for minor point releases.  But
for transitioning between major releases, this needs to be part of
admin-performed upgrade instructions.
IMO, when data needs to be massaged in a preference backend, it should 
be done as a mainenance task since not all preference backends can be 
accessed without an explicit user login. Unless I'm missing something...
06/02/2009 07:30:30 PM Michael Slusarz Comment #21
State ⇒ Resolved
Reply to this comment
If your default sortorder is stored as integer value 161 in the
preferences, that needs to be fixed in your pref backend.  Probably
would be useful to have a conversion script for this kind of thing.
That would usually done by a maintenance task like the one-time task
in Turba.
I disagree.  Maintenance tasks are OK for minor point releases.  But 
for transitioning between major releases, this needs to be part of 
admin-performed upgrade instructions.
At least it should fall back to some default sorting order if the
stored value isn't correct.
This turns out to be a better place to check for this.  Although it 
adds a bit of overhead everytime the sortby pref is accessed, it is 
probably good to always make sure this value is valid anyway.
05/19/2009 08:13:13 AM Jan Schneider Comment #20 Reply to this comment
If your default sortorder is stored as integer value 161 in the
preferences, that needs to be fixed in your pref backend.  Probably
would be useful to have a conversion script for this kind of thing.
That would usually done by a maintenance task like the one-time task in Turba.



At least it should fall back to some default sorting order if the 
stored value isn't correct.
05/18/2009 11:10:00 PM Michael Slusarz Comment #19 Reply to this comment

[Show Quoted Text - 12 lines]
If your default sortorder is stored as integer value 161 in the 
preferences, that needs to be fixed in your pref backend.  Probably 
would be useful to have a conversion script for this kind of thing.
04/22/2009 08:26:29 PM Jan Schneider Comment #18 Reply to this comment

[Show Quoted Text - 9 lines]
That's my default sorting order from the preferences. I got that 
result from hitting one of the columns in the empty virtual folder.
04/22/2009 06:25:57 PM Michael Slusarz Comment #17 Reply to this comment

[Show Quoted Text - 9 lines]
I don't see this either.  Sorting via Date or sequence number, no 
matter the direction pref, works fine for me.
04/22/2009 06:23:04 PM Michael Slusarz Comment #16 Reply to this comment
This the response that I get from the ViewPort action, that doesn't
let the sort column header stay highlighted in empty virtual folders:
{"response":{"ViewPort":{"view":"**search_136392034149d47fa4c3c3b","totalrows":0,"label":"IMP5"
,"cacheid":"124038911327975780","metadata":{"nothread":1,"sortby":161,"sortdir":1,"search":1},"rowlist"
:[],"data":[],"update":1,"request_id":3}}}
How did you get sortby:161 (that's the old value for thread sort in 
IMP 4.  That constant is not used in IMP 5 and, regardless, threading 
is not available for search results).



I can confirm that thread sort is not available in DIMP when viewing 
Virtual Folders.
04/22/2009 08:33:29 AM Jan Schneider Comment #15 Reply to this comment
This the response that I get from the ViewPort action, that doesn't 
let the sort column header stay highlighted in empty virtual folders:

{"response":{"ViewPort":{"view":"**search_136392034149d47fa4c3c3b","totalrows":0,"label":"IMP5"

,"cacheid":"124038911327975780","metadata":{"nothread":1,"sortby":161,"sortdir":1,"search":1},"rowlist"

:[],"data":[],"update":1,"request_id":3}}}
04/22/2009 08:20:11 AM Jan Schneider Comment #14
Summary ⇒ Mailbox sorting bugs
Reply to this comment
I see some other sorting weirdness now, in the IMP interface. If 
sorting in reverse order, the mailbox pages are correctly sorted, but 
inside a single mailbox page, the sorting is in the wrong order.

For example I have:

page 1: March to April

page 2: January to February

while it should be:

page 1: April to March

page 2: February to March
04/21/2009 03:45:00 PM Michael Slusarz Comment #13 Reply to this comment
On a related issue: the highlighting of subject vs. thread is swapped.
Scratch that. I was confused because sorting by subject is threaded
too now. The difference to regular thread sorting is, that the base
messages are sorted alphabetically instead of chronologically. Is
that intended?
No.  Somewhere during the ViewPort rewrite the sortby check was lost.   
This has been fixed.
04/21/2009 03:40:26 PM Michael Slusarz Comment #12 Reply to this comment
No. When I click on the column header, it is shortly highlighted, the
mailbox reloaded, but when the reload finishes (quickly, because the
mailbox is empty), it's back to no headers being highlighted.
I don't see this at all.  Clicking on any sorting column is sticky for me.


04/21/2009 09:58:35 AM Jan Schneider Comment #11 Reply to this comment
On a related issue: the highlighting of subject vs. thread is swapped.
Scratch that. I was confused because sorting by subject is threaded 
too now. The difference to regular thread sorting is, that the base 
messages are sorted alphabetically instead of chronologically. Is that 
intended?
04/21/2009 09:54:04 AM Jan Schneider Comment #10 Reply to this comment
No. When I click on the column header, it is shortly highlighted, the 
mailbox reloaded, but when the reload finishes (quickly, because the 
mailbox is empty), it's back to no headers being highlighted.

On a related issue: the highlighting of subject vs. thread is swapped.
04/21/2009 05:56:14 AM Michael Slusarz Comment #9
Version ⇒ Git master
Reply to this comment
With my latest changes to ViewPort code, I don't see this anymore.  Confirmed?
04/03/2009 10:28:30 PM Jan Schneider Comment #8 Reply to this comment
Ah right, I missed this was originally about DIMP.



It's even worse now. Changing the sort order in an empty folder still 
only reloads the mailbox without actually changing the order. If 
changing the sort order in a folder with messages, DIMP is constantly 
sending ListMessage requests now. This is a typical exchange:



cached        {22}INBOX.sent.sent-Privat1

cacheid        1238600802|3|2|8|0

request_id        1

rownum        1

slice        2:71

view        INBOX.sent.sent-Privat



/*-secure-{"response":{"viewport":{"id":"INBOX.sent.sent-Privat","reset":0,"totalrows":2,"label":"sent

.sent-Privat","cacheid":"1238600802|3|2|8|0","metadata":{"sortby":8,"sortdir":0,"special":1,"unseen"

:0},"rowlist":{"1":2},"data":[],"request_id":"1"}}}*/


04/03/2009 05:16:06 PM Michael Slusarz Comment #7 Reply to this comment
This seems to work fine for me in the Git code.  Jan, can you try the
code there?
There is actually no way to change the sort order on empty folders
anymore, since the mailbox header is only displayed if there are
messages in the folder. Thus this problem is moot now.
I don't see this - the mailbox header is always shown in dimp.  Are 
you talking about IMP or DIMP (this is a dimp ticket).
04/03/2009 05:15:11 PM Michael Slusarz Comment #6 Reply to this comment
This seems to work fine for me in the Git code.  Jan, can you try the
code there?
There is actually no way to change the sort order on empty folders
anymore, since the mailbox header is only displayed if there are
messages in the folder. Thus this problem is moot now.
04/02/2009 09:08:16 AM Jan Schneider Comment #5 Reply to this comment
This seems to work fine for me in the Git code.  Jan, can you try the
code there?
There is actually no way to change the sort order on empty folders 
anymore, since the mailbox header is only displayed if there are 
messages in the folder. Thus this problem is moot now.
04/01/2009 07:34:16 PM Michael Slusarz Comment #4 Reply to this comment
( ! ) Fatal error: Horde_Imap_Client_Base::search()
[horde-imap-client-base.search]: The script tried to execute a method
or access a property of an incomplete object. Please ensure that the
class definition "imp_imap_search_query"
You are going to have to recreate Virtual Folders for IMP 5.  I 
haven't written an upgrade script because 1.) there is no guarantee I 
won't change the internal search format 5 times before IMP 5 is 
released, and 2.) with the whole protected/private object model in PHP 
5, it may no longer be possible to upgrade object structures  without 
mucking around with __get and __set commands, which IMHO is hackish 
and completely destroys the concept of private variables.
03/31/2009 09:01:54 AM Jan Schneider Comment #3 Reply to this comment
I can't load empty virtual folders at all atm. This is what I get when 
accessing a virtual folder from the sidebar:



( ! ) Fatal error: Horde_Imap_Client_Base::search() 
[horde-imap-client-base.search]: The script tried to execute a method 
or access a property of an incomplete object. Please ensure that the 
class definition "imp_imap_search_query" of the object you are trying 
to operate on was loaded _before_ unserialize() gets called or provide 
a __autoload() function to load the class definition in 
/home/jan/horde-git/framework/Imap_Client/lib/Horde/Imap/Client/Base.php on 
line 1315

Call Stack

#        Time        Memory        Function        Location

1        0,0059        460376        {main}( )        ../mailbox.php:0

2        1,8616        13232148        IMP_Mailbox->buildMailboxPage( NULL, NULL, ??? 
)        ../mailbox.php:258

3        1,8616        13232148        IMP_Mailbox->_buildMailbox( )        ../Mailbox.php:434

4        1,8660        13308340        IMP_Search->runSearch( NULL, 
'**search_nwnm9pgtv9c0w0g8c0' )        ../Mailbox.php:256

5        1,8704        13311560        Horde_Imap_Client_Base->search( 
'INBOX.Mailinglisten.Bugtraq', class __PHP_Incomplete_Class { public 
$__PHP_Incomplete_Class_Name = 'imp_imap_search_query'; public $_and = 
array (); public $_extendedSearch = array (); public $_flags = array 
(); public $_not = FALSE; public $_or = array (0 => array (0 => class 
__PHP_Incomplete_Class { ... }, 1 => class __PHP_Incomplete_Class { 
... })); public $_query = NULL; public $_size = NULL; public $_sizeop 
= NULL }, array ('reverse' => '1', 'sort' => array (0 => '0')) 
)        ../Search.php:145
03/31/2009 03:10:44 AM Michael Slusarz Comment #2
State ⇒ Feedback
Assigned to Jan Schneider
Reply to this comment
This seems to work fine for me in the Git code.  Jan, can you try the 
code there?
01/08/2009 05:33:27 AM Michael Slusarz Version ⇒ HEAD
Queue ⇒ IMP
 
09/06/2008 08:14:22 AM Jan Schneider Comment #1
Priority ⇒ 1. Low
State ⇒ Assigned
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Summary ⇒ Changing sort order on empty folders
Type ⇒ Bug
Queue ⇒ DIMP
Reply to this comment
If changing the sort order on empty (virtual) folders, the order 
doesn't stick, i.e. the mailbox is resorted (even though it's empty), 
and comes back with the old sort column header highlighted.

Saved Queries