6.0.0-git
2019-03-19

[#2305] Problems with virtual folders
Summary Problems with virtual folders
Queue IMP
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester kevin_myer (at) iu13 (dot) org
Created 2005-07-19 (4991 days ago)
Due
Updated 2005-11-07 (4880 days ago)
Assigned 2005-10-20 (4898 days ago)
Resolved 2005-11-04 (4883 days ago)
Milestone
Patch No

History
2005-11-07 21:31:35 kevin_myer (at) iu13 (dot) org Comment #13 Reply to this comment
This looks like it has been resolved - namely that we are not going
through the overhead in the sidebar to display the requested data
because the punishment far exceeds the payment.
Except I'd say its better to display NO information about message 
counts in the side bar, than it is to display inaccurate information.   
I only use Virtual Trash at home at this point, and I don't get very 
many messages, but I do rely almost exclusively on the message counts 
in the side bar to notify me of new mail, at least at this point.  And 
it still gets annoying if I click on my INBOX because I think I have 
new mail, only to find none, and then remember that its the unread 
messages in Virtual Trash.  Normal end-users don't understand or care 
about the different parameters that imap_search and imap_status take 
and I can see a number of support requests coming in if we were to use 
Virtual Trash in production, about messages not showing up.



How about a compromise that would leave the behavior the way it 
currently is, if not using Virtual Trash.  But if using Virtual Trash, 
use imap_search instead, so numbers are accurate.



Do you have any benchmarks for the amount of overhead that imap_search 
adds, vs. using imap_status, to get # of messages, unseen, and new 
messages?
2005-11-04 06:33:55 Michael Slusarz Comment #12
State ⇒ Not A Bug
Reply to this comment
This looks like it has been resolved - namely that we are not going 
through the overhead in the sidebar to display the requested data 
because the punishment far exceeds the payment.
2005-10-20 14:56:20 kevin_myer (at) iu13 (dot) org Comment #11 Reply to this comment
The difference is that completely different c-client calls are used.
The one that returns a mailbox overview, like used in the mailbox
page, also returns all the messages' states. The one that returns the
folder status, like used in the folder trees, only returns a few
states, and not the deleted state.
Got it (I think).  imap_search vs. imap_status, and now that I think 
about it, I think someone pointed that out before as well.
2005-10-20 14:45:55 Jan Schneider Comment #10 Reply to this comment
What I'm curious to know is the how the unread message count *is*
correct in the mailbox list screen.  If I'm using Virtual Trash and I
The difference is that completely different c-client calls are used. 
The one that returns a mailbox overview, like used in the mailbox 
page, also returns all the messages' states. The one that returns the 
folder status, like used in the folder trees, only returns a few 
states, and not the deleted state.
2005-10-20 14:26:20 kevin_myer (at) iu13 (dot) org Comment #9 Reply to this comment
I think I muddied this ticket with a bunch of other things, which I 
think are working cleanly now.



The one issue was about the message counts in the sidebar and folder, 
and while its convenient to dismiss that as being too expensive to 
compute, it's not going to be convenient to have to explain to end 
users that even though it says they have two unread messages in their 
INBOX, they really don't, at least not visible ones.



What I'm curious to know is the how the unread message count *is* 
correct in the mailbox list screen.  If I'm using Virtual Trash and I 
delete a message without reading it, the unread message count is 
correct in the mailbox view, but different in the folder and sidebar 
view.
2005-10-20 07:47:43 Jan Schneider Comment #8 Reply to this comment
Are you guys talking about the message count in the folder 
navigator/sidebar? Then yes, I agree, that would be total overkill.
2005-10-20 04:57:23 Michael Slusarz Comment #7
State ⇒ Feedback
Reply to this comment
Not sure what the status of this is.  If I remember correctly, trying 
to do unseen/seen stuff with the virtual folders is undoable due to 
the fact we would have to parse all messages in all mailboxes to get 
this info which is simply too much of a CPU crunch.  Does this sound 
correct?
2005-07-20 12:18:03 kevin_myer (at) iu13 (dot) org Comment #6 Reply to this comment
When using vtrash, not sure how you handle the case of displaying new
mail count for folders that have deleted but unseen messages, because
UNSEEN really equals total (UNSEEN) - deleted (UNSEEN).  Is it as
simple as doing a search for MESSAGES|UNSEEN|RECENT and subtract the
results of MESSAGES|UNSEEN|RECENT|DELETED ?
Nevermind that suggestion - having just read the discussion on the IMP 
mailing list, it probably is easier to mark the messages as seen, if 
you want an accurate unseen message count.  You do that at the expense 
of transparently changing the status of a message - if I, for 
instance, delete a message without reading it, and later remember that 
I really actually needed it, and I goto Virtual Trash to retrieve it, 
I'm going to be looking for an unread message but its been altered on 
me.



Question - let's say you were rewriting the IMAP library - _should_ 
imap_status take other flags as options?
2005-07-20 02:40:35 kevin_myer (at) iu13 (dot) org Comment #5 Reply to this comment
#1 is resolved, per your clarification.



Some more information:



The Virtual Trash ID is changing every time I refresh the left sidebar.



I turned on telemetry on the IMAP server side for my account.  No IMAP 
search is ever being executed when I click on the Virtual Trash 
folder, so its of no surprise that its not returning any results.



When using vtrash, not sure how you handle the case of displaying new 
mail count for folders that have deleted but unseen messages, because 
UNSEEN really equals total (UNSEEN) - deleted (UNSEEN).  Is it as 
simple as doing a search for MESSAGES|UNSEEN|RECENT and subtract the 
results of MESSAGES|UNSEEN|RECENT|DELETED ?
2005-07-19 22:41:43 kevin_myer (at) iu13 (dot) org Comment #4 Reply to this comment
As to problem #1 - this is due to you updating CVS in the past
without updating your prefs.php file.  The virtual inbox preference
was added sometime after virtual folder support was added - IMP
deleted the old virtual inbox on every login and creates a new one.
If you didn't update your prefs, there was no way to delete the old
virtual inboxes.  THis is why they exist.  You need to completely
nuke your 'vfolder' preference to get rid of these extra virtual
INBOXes.
Gotcha - I was interpretting updating your prefs to mean merging 
prefs.php.dist to prefs.php, which I admittedly don't always do after 
I CVS update and since I don't, I have to delete vfolder altogether 
and start fresh with that pref.
2005-07-19 22:14:38 Michael Slusarz Comment #3
State ⇒ Assigned
Reply to this comment
As to problem #1 - this is due to you updating CVS in the past without 
updating your prefs.php file.  The virtual inbox preference was added 
sometime after virtual folder support was added - IMP deleted the old 
virtual inbox on every login and creates a new one.  If you didn't 
update your prefs, there was no way to delete the old virtual inboxes. 
  THis is why they exist.  You need to completely nuke your 'vfolder' 
preference to get rid of these extra virtual INBOXes.
2005-07-19 21:54:50 kevin_myer (at) iu13 (dot) org Comment #2 Reply to this comment
Second, I have use_vtrash turned on.  At work, when I delete a
message, it is still going to my physical IMAP Trash folder.  At
home, the messages are disappearing altogether, but the number of
unread messages is not decreasing by a corresponding amount (it
appears that deleted but unread messages are being included in folder
counts).  In both cases, if I click on Virtual Trash, I get nothing.
I had wanted to add earlier, but needed to confirm it and now can - 
the messages that are being deleted at home are still in my INBOX 
folder, if I look at the raw mail store.  So the hiding of deleted 
messages in folder is working - its just the search that should pull 
all of them together is not, at least with my setup.
At work, I was getting:
Undefined index:  jcp42qjjhten4kwgkw in /horde/imp/lib/VFolder.php on
line 255
although that value changes from login to login.  At home, I see
nothing.  So it seems that its not finding the deleted messages at
home, and the vfolder id isn't being saved properly at work.
I'm also seeing the undefined index error at home now, as well.
2005-07-19 20:18:53 kevin_myer (at) iu13 (dot) org Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Problems with virtual folders
Queue ⇒ IMP
Reply to this comment
I had posted about this to the mailing list, but since I'm able to 
reproduce this at home and work (different servers/OS/configs), I must 
either consistently be doing something wrong, or there are bug(s) in 
the vfolder code.



First, I have multiple Virtual INBOXes that show up in my Virtual 
Folders area.  All of them take me the same place, but only one has 
the true Virtual INBOX icon.  Chuck's suggestion was that my 
preferences were out of sync and that they needed refreshed, but I had 
synced them already.  Logging out and back in did not make the ghost 
folders disappear.



Second, I have use_vtrash turned on.  At work, when I delete a 
message, it is still going to my physical IMAP Trash folder.  At home, 
the messages are disappearing altogether, but the number of unread 
messages is not decreasing by a corresponding amount (it appears that 
deleted but unread messages are being included in folder counts).  In 
both cases, if I click on Virtual Trash, I get nothing.



At work, I was getting:

Undefined index:  jcp42qjjhten4kwgkw in /horde/imp/lib/VFolder.php on line 255

although that value changes from login to login.  At home, I see 
nothing.  So it seems that its not finding the deleted messages at 
home, and the vfolder id isn't being saved properly at work.



Finally, I cloned a production FRAMEWORK_3 install to get the data to 
use for this HEAD install.  In the left sidebar, my previous virtual 
folders show up there.  When I goto the search screen, where I could 
previously edit virtual folders, none show up - there is just the 
ability to save a search as a virtual folder.  And only 2 out of 3 of 
the previous virtual folders in the left sidebar work.  The one that 
does not returns all the messages in my Inbox and it should only 
return messages from one sender.

Saved Queries