6.0.0-beta1
7/9/25

[#11128] Infinite loop expanding containers
Summary Infinite loop expanding containers
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 04/04/2012 (4844 days ago)
Due
Updated 08/29/2012 (4697 days ago)
Assigned 04/04/2012 (4844 days ago)
Resolved 05/24/2012 (4794 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/29/2012 12:35:45 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git (master):

commit d7d183e0caad77bc3df1696b646e0c12cbb0b1a4
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Apr 4 16:04:17 2012 -0600

     Bug #11128: Dynamic view folder tree fixes

  imp/js/dimpbase.js |   19 +++++++++++--------
  1 files changed, 11 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/d7d183e0caad77bc3df1696b646e0c12cbb0b1a4
05/24/2012 06:31:35 PM Michael Slusarz State ⇒ Resolved
 
04/05/2012 05:14:59 PM Michael Slusarz Comment #9 Reply to this comment
Is "sent" really a container?  If so, it should NOT appear in dynamic
view since it doesn't have any non-special children.
Good point. It has unsubscribed folders, but it indeed only has 
subscribed special folders. I agree it shouldn't show up at all in 
the first place.
There's still some tweakiness when it comes to these "empty" 
containers (meaning containers that only contain special mailboxes).   
For example, if you subsequently add a mailbox to this container, it 
won't appear until the tree is rebuilt.  And if you delete this 
mailbox, the container won't be destroyed.

Doing the latter, I can end up in the situation where we have just the 
container.  But opening the container does not cause an infinite loop 
- it only calls listMailboxes once.

I don't think having an unsubscribed mailbox should change things, 
since the Tree code is not normally aware this mailbox ever exists.
Sure enough, if I create a container with only special mailboxes, the
container doesn't appear in dynamic view.
I'll see if I can track further down why it's added to the tree.
This whole special-mailboxes container code is difficult to implement 
correctly.  I might have to go back and give it a second look.
04/05/2012 08:40:43 AM Jan Schneider Comment #8 Reply to this comment
Is "sent" really a container?  If so, it should NOT appear in 
dynamic view since it doesn't have any non-special children.
Good point. It has unsubscribed folders, but it indeed only has 
subscribed special folders. I agree it shouldn't show up at all in the 
first place.
Sure enough, if I create a container with only special mailboxes, 
the container doesn't appear in dynamic view.
I'll see if I can track further down why it's added to the tree.
04/04/2012 11:10:11 PM Michael Slusarz Comment #7 Reply to this comment
Is "sent" really a container?  If so, it should NOT appear in dynamic 
view since it doesn't have any non-special children.

Sure enough, if I create a container with only special mailboxes, the 
container doesn't appear in dynamic view.
04/04/2012 10:42:42 PM Jan Schneider Comment #6 Reply to this comment
No, doesn't make a difference.
04/04/2012 10:05:50 PM Michael Slusarz Comment #5 Reply to this comment
commit d7d183e0caad77bc3df1696b646e0c12cbb0b1a4
Maybe this fixes?  Couldn't reproduce infinite looping but this fixes 
some other strange behavior.
04/04/2012 10:04:29 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (develop):

commit d7d183e0caad77bc3df1696b646e0c12cbb0b1a4
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Apr 4 16:04:17 2012 -0600

     Bug #11128: Dynamic view folder tree fixes

  imp/js/dimpbase.js |   19 +++++++++++--------
  1 files changed, 11 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/d7d183e0caad77bc3df1696b646e0c12cbb0b1a4
04/04/2012 08:33:37 PM Jan Schneider Comment #3
New Attachment: bug11128.png Download
Reply to this comment
Pretty plain actually, this is from traditional view.
04/04/2012 06:29:43 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Can you describe the subfolder that is causing this problem a bit 
better?  I have tested with these, and could not reproduce with either:

+ A (container)
    +  B (container)
        + C (mailbox)

+ A (container)
    + B (mailbox)
    + C (mailbox)
04/04/2012 01:36:01 PM Jan Schneider Comment #1
Milestone ⇒
State ⇒ Assigned
Patch ⇒ No
Assigned to Michael Slusarz
Queue ⇒ IMP
Summary ⇒ Infinite loop expanding containers
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
I have one container called "sent" which has several sub-folders. 
Expanding that folder gets the javascript into an infinite loop:

_listFolders()dimpbase.js (Zeile 2930)
params = Object { all=0, base=li#fldSU5CT1guc2VudA.container, mboxes=[1]}
_toggleSubFolder()dimpbase.js (Zeile 2878)
base = li#fldSU5CT1guc2VudA.container
mode = "tog"
noeffect = false
noexpand = true
_folderLoadCallback()dimpbase.js (Zeile 2792)
params = Object { all=0, base=li#fldSU5CT1guc2VudA.container, 
mboxes="["SU5CT1guc2VudA"]", mehr...}
r = Object { response={...}, msgs=[0]}
bind()prototype.js (Zeile 391)
doActionComplete()dimpcore.js (Zeile 135)
request = klass { request=klass, transport=XMLHttpRequest, 
readyState=4, mehr...}
callback = function()
onComplete()dimpcore.js (Zeile 70)
t = klass { request=klass, transport=XMLHttpRequest, readyState=4, mehr...}
o = null
bind()prototype.js (Zeile 391)
respondToReadyState()prototype.js (Zeile 1615)
readyState = 4
onStateChange()prototype.js (Zeile 1545)
bind()prototype.js (Zeile 391)

In _toggleSubFolder(), "need" contains the "sent" folder that has been 
expanded. Folders with sub-folders work just fine.

Saved Queries