6.0.0-git
2019-04-24

[#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 2008-09-06 (3882 days ago)
Due
Updated 2010-01-13 (3388 days ago)
Assigned 2009-03-31 (3676 days ago)
Resolved 2009-06-02 (3613 days ago)
Milestone
Patch No

History
2010-01-13 00:01:53 CVS Commit Comment #24 Reply to this comment
2009-06-08 18:15:42 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.
2009-06-02 21:59:14 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...
2009-06-02 19:30:30 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.
2009-05-19 08:13:13 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.
2009-05-18 23:10:00 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.
2009-04-22 20:26:29 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.
2009-04-22 18:25:57 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.
2009-04-22 18:23:04 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.
2009-04-22 08:33:29 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}}}
2009-04-22 08:20:11 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
2009-04-21 15:45:00 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.
2009-04-21 15:40:26 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.


2009-04-21 09:58:35 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?
2009-04-21 09:54:04 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.
2009-04-21 05:56:14 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?
2009-04-03 22:28:30 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"}}}*/


2009-04-03 17:16:06 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).
2009-04-03 17:15:11 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.
2009-04-02 09:08:16 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.
2009-04-01 19:34:16 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.
2009-03-31 09:01:54 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
2009-03-31 03:10:44 Michael Slusarz Comment #2
Assigned to Jan Schneider
State ⇒ Feedback
Reply to this comment
This seems to work fine for me in the Git code.  Jan, can you try the 
code there?
2009-01-08 05:33:27 Michael Slusarz Version ⇒ HEAD
Queue ⇒ IMP
 
2008-09-06 08:14:22 Jan Schneider Comment #1
Type ⇒ Bug
State ⇒ Assigned
Priority ⇒ 1. Low
Summary ⇒ Changing sort order on empty folders
Queue ⇒ DIMP
Assigned to Michael Slusarz
Milestone ⇒
Patch ⇒ No
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