6.0.0-beta1
7/22/25

[#9439] new subfolder doesn't show in folder list
Summary new subfolder doesn't show in folder list
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester rsalmon (at) mbpgroup (dot) com
Created 12/09/2010 (5339 days ago)
Due
Updated 01/20/2011 (5297 days ago)
Assigned 12/09/2010 (5339 days ago)
Resolved 01/20/2011 (5297 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/20/2011 05:03:15 AM Michael Slusarz Comment #12
State ⇒ Resolved
Reply to this comment
Changes have been made in Git for this ticket:

Bug #9349: Fix new subfolder doesn't show in folder list
Problem only occurred if all (unsubscribed) folders are viewed.
hasChildren() was always returning true because we created the parent
element before making the initial hasChildren() check.  Need to check
for children before this.

http://git.horde.org/horde-git/-/commit/245d08ddc7d2f1b0d72eee0b3f96ebc164534899
01/18/2011 05:12:59 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #11 Reply to this comment
The problem is when you create a subfolder manually (right-click,
"create subfolder"). If the parent folder does not have any child,
the div container does not exist (like you said) and the created
folder will not appear until you refresh the page.
This is exactly what I am doing.
I misunderstood then, sorry.
It is expected that the div container won't exist in this instance - 
it is created when processing the JSON return.  There should be a 
'c' entry which causes the parent folder to be rebuilt.
Ok, I will check that, thanks :)

01/18/2011 04:49:17 PM Michael Slusarz Comment #10 Reply to this comment
Just in case this could be related to the IMAP server, we're using 
courier-imap.
I tested on Courier-IMAP and it works for me, so that's not the 
exclusive cause of the problem.
01/18/2011 04:48:18 PM Michael Slusarz Comment #9 Reply to this comment
The problem is when you create a subfolder manually (right-click, 
"create subfolder"). If the parent folder does not have any child, 
the div container does not exist (like you said) and the created 
folder will not appear until you refresh the page.
This is exactly what I am doing.

It is expected that the div container won't exist in this instance - 
it is created when processing the JSON return.  There should be a 'c' 
entry which causes the parent folder to be rebuilt.
01/18/2011 10:52:14 AM rsalmon (at) mbpgroup (dot) com Comment #8 Reply to this comment
As can be seen, my response has both an 'a' entry (the new mailbox) 
and a 'c' entry (the parent mailbox).

You (or someone else who can reproduce) will have to track down why 
the 'c' entry is not being returned.  This information is generated 
via the trackdiff functionality in IMP_Imap_Tree.
I'll try to debug end of the week.

Just in case this could be related to the IMAP server, we're using 
courier-imap.



01/18/2011 10:40:58 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #7 Reply to this comment
Same issue here. The problem only occurs when the folder has no
subfolders yet. The div container does not exists so getSubFolderId
return null.
This is an incorrect statement.  The subfolder div is created only 
when the parent folder reports it has children.  This all works fine 
for me.
The problem is when you create a subfolder manually (right-click, 
"create subfolder"). If the parent folder does not have any child, the 
div container does not exist (like you said) and the created folder 
will not appear until you refresh the page.

After page refresh the behavior is just like you said and all works fine.

01/18/2011 07:07:45 AM Michael Slusarz Comment #6
Assigned to Michael Slusarz
Reply to this comment
POST :
mbox=tettt&parent=INBOX.Test2.TEst.123

Response :
/*-secure-{"response":{"mailbox":{"a":[{"m":"INBOX.Test2.TEst.123.tettt","l":"tettt","pa":"INBOX.Test2.TEst.123","t":"Test2.TEst.123.tettt","cl":"folderImg"}]}},"msgs":[{"charset":"UTF-8","message":"Le dossier \u00ab\u00a0Test2.TEst.123.tettt\u00a0\u00bb a bien \u00e9t\u00e9 cr\u00e9\u00e9.","flags":[],"type":"horde.success"},{"charset":"UTF-8","message":"000","flags":{"alarm":{"id":"20101207131722.DSPTHIgBqn9M-iXSNGx3QLA@127.0.0.1","user":"rsalmon","start":{},"end":{},"methods":["notify"],"params":{"notify":{"show":{"__app":"kronolith","event":"J3QRYogBqn9M-iXSM__3QLA","calendar":"rsalmon"},"ajax":"event:internal|rsalmon:J3QRYogBqn9M-iXSM__3QLA:20101210","subtitle":"From <strong>10.12.2010 at 12:00<\/strong> to <strong>10.12.2010 at 
13:00<\/strong>"}},"title":"000","text":null,"snooze":null,"internal":null}},"type":"horde.alarm"}]}*/
Sure enough, your JSON response is badly broken.  It only lists a 
single added mailbox.  But there also needs to be a "changed" mailbox 
- namely the original mailbox (since it now contains children).  e.g.:

POST :
mbox=b&parent=INBOX.test1

JSON Response:

/*-secure-{"response":{"mailbox":{"a":[{"m":"INBOX.test1.b","l":"b","pa":"INBOX.test1","t":"test1.b","cl":"folderImg"}],"c":[{"ch":1,"m":"INBOX.test1","l":"test1","t":"test1","cl":"folderImg"}]}},"msgs":[{"charset":"UTF-8","message":"The folder \"test1.b\" was successfully created.","flags":[],"type":"horde.success"},{"charset":"UTF-8","message":"You were successfully subscribed to 
\"test1.b\"","flags":[],"type":"horde.success"}]}*/

As can be seen, my response has both an 'a' entry (the new mailbox) 
and a 'c' entry (the parent mailbox).

You (or someone else who can reproduce) will have to track down why 
the 'c' entry is not being returned.  This information is generated 
via the trackdiff functionality in IMP_Imap_Tree.
01/18/2011 07:02:41 AM Michael Slusarz Comment #5 Reply to this comment
Same issue here. The problem only occurs when the folder has no 
subfolders yet. The div container does not exists so getSubFolderId 
return null.
This is an incorrect statement.  The subfolder div is created only 
when the parent folder reports it has children.  This all works fine 
for me.
01/04/2011 03:39:05 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #4 Reply to this comment
Same issue here. The problem only occurs when the folder has no 
subfolders yet. The div container does not exists so getSubFolderId 
return null.

[Show Quoted Text - 34 lines]
12/10/2010 09:42:03 AM rsalmon (at) mbpgroup (dot) com Comment #3 Reply to this comment
Look at the AJAX response and make sure the server is returning the 
proper mailbox information and/or report any JS errors you see.
Forgot to post Firebug log :

doActionComplete TypeError: 
$(this.getSubFolderId(this.getFolderId(ob.pa))) is null { 
message="$(this.getSubFolderId(t...lderId(ob.pa))) is null", more...}
dimpcore.js (ligne 33)

Stack = "([object 
Object],0)@http://127.0.0.1/horde/imp/js/dimpbase.js:2698 ([object 
Object],0)@http://127.0.0.1/horde/js/prototype.js:391 ([object 
Object],0,[object Array])@http://127.0.0.1/horde/js/prototype.js:825 
each((function () {var a = merge(args, arguments);return 
__method.apply(context, 
a);}))@http://127.0.0.1/horde/js/prototype.js:824 ([object 
Object])@http://127.0.0.1/horde/imp/js/dimpbase.js:2386 ([object 
Object])@http://127.0.0.1/horde/js/prototype.js:391 ([object 
Object],(function () {var a = merge(args, arguments);return 
__method.apply(context, 
a);}))@http://127.0.0.1/horde/imp/js/dimpcore.js:193 ([object 
Object],null)@http://127.0.0.1/horde/imp/js/dimpcore.js:126 ([object 
Object],null)@http://127.0.0.1/horde/js/prototype.js:391 
(4)@http://127.0.0.1/horde/js/prototype.js:1615 ([object 
Event])@http://127.0.0.1/horde/js/prototype.js:1545 ([object 
Event])@http://127.0.0.1/horde/js/prototype.js:391 handleEvent([object 
Event])@:0 SJOWContentBoundary()@:0 "


POST :
mbox=tettt&parent=INBOX.Test2.TEst.123

Response :
/*-secure-{"response":{"mailbox":{"a":[{"m":"INBOX.Test2.TEst.123.tettt","l":"tettt","pa":"INBOX.Test2.TEst.123","t":"Test2.TEst.123.tettt","cl":"folderImg"}]}},"msgs":[{"charset":"UTF-8","message":"Le dossier \u00ab\u00a0Test2.TEst.123.tettt\u00a0\u00bb a bien \u00e9t\u00e9 cr\u00e9\u00e9.","flags":[],"type":"horde.success"},{"charset":"UTF-8","message":"000","flags":{"alarm":{"id":"20101207131722.DSPTHIgBqn9M-iXSNGx3QLA@127.0.0.1","user":"rsalmon","start":{},"end":{},"methods":["notify"],"params":{"notify":{"show":{"__app":"kronolith","event":"J3QRYogBqn9M-iXSM__3QLA","calendar":"rsalmon"},"ajax":"event:internal|rsalmon:J3QRYogBqn9M-iXSM__3QLA:20101210","subtitle":"From <strong>10.12.2010 at 12:00<\/strong> to <strong>10.12.2010 at 
13:00<\/strong>"}},"title":"000","text":null,"snooze":null,"internal":null}},"type":"horde.alarm"}]}*/

12/09/2010 06:25:19 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Works fine for me.

Look at the AJAX response and make sure the server is returning the 
proper mailbox information and/or report any JS errors you see.

For further debugging information, please read the 'AJAX 
Troubleshooting' section in imp/docs/INSTALL.
12/09/2010 10:50:37 AM rsalmon (at) mbpgroup (dot) com Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ new subfolder doesn't show in folder list
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
using dynamic view,

create folder Test => folder list is updated and "Test" appears just fine.
right click on "Test" and "Create subfolder" Test2 => "Test2" is 
created, but folder list is not updated.

If I "Rebuild Folder List", folder "Test2" appears.

This behaviour seems to happen on any folder that doesn't have any child.

Saved Queries