Summary | DIMP fails to render the IMAP folder list when subfolders exist |
Queue | DIMP |
Queue Version | 1.1 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | gunnar.beutner (at) hetzner (dot) de |
Created | 12/20/2008 (6100 days ago) |
Due | |
Updated | 12/21/2008 (6099 days ago) |
Assigned | 12/20/2008 (6100 days ago) |
Resolved | 12/21/2008 (6099 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
fix my problem. Here's a transcript of my debugging session with
Google Chrome's JavaScript debugger:
Using the pre-1.1.2.116 code:
$ break DimpBase.js:1574
set breakpoint
#1paused at breakpoint 1: #<an Object>.createFolder(ob=#<an Object>, 5),
https://some-server/dimp/js/DimpBase.js
1574: parent_e = (parent_e) ? parent_e.down('UL') :
$('normalfolders');
$ p parent_e
#<an HTMLLIElement>
$ p parent_e.down('UL')
undefined
$ p parent_e.innerHTML
<ul></ul>
Using the getFolderId()-function from rev. 1.1.2.116:
paused at breakpoint 1: #<an Object>.createFolder(ob=#<an Object>, 5),
https://some-server/dimp/js/DimpBase.js
1574: parent_e = (parent_e) ? parent_e.down('UL') :
$('normalfolders');
$ p parent_e
#<an HTMLLIElement>
$ p parent_e.down('UL')
#<an HTMLUListElement>
$ p parent_e.innerHTML
<ul></ul>
Oddly enough the <ul>-element actually exists in both cases, but for
some reason the down() method can't seem to navigate to it.
State ⇒ Feedback
different way we calculate the folder ID in HEAD. I've gone ahead and
backported the change from HEAD into DIMP 1.1.1 - let me know if that
fixes things for you (see commit message contained in this ticket's
history).
http://cvs.horde.org/diff.php/dimp/js/DimpBase.js?r1=1.1.2.115&r2=1.1.2.116&ty=u
http://cvs.horde.org/diff.php/dimp/js/src/DimpBase.js?r1=1.1.2.115&r2=1.1.2.116&ty=u
Assigned to Michael Slusarz
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ DIMP fails to render the IMAP folder list when subfolders exist
Queue ⇒ DIMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: dimp-subfolder-fix.patch
State ⇒ Unconfirmed
<li ftype="folder" mbox="INBOX.Foldername" l="Foldername"
id="fldINBOX.Foldername" class="folder">
<div id="fldINBOX.Foldername_div" class="exp">
</div>
<a title="Foldername" id="fldINBOX.Foldername_label">Foldername</a>
</li>
<li style="display: none;" id="subfldINBOX.Foldername" class="subfolders">
<ul>
[...]
</ul>
</li>
Later on DIMP tries to find the <ul>-tag in order to add subfolders.
However - using certain browsers like Google Chrome and Safari - the
code that is responsible for finding the <ul>-tag returns 'undefined'
which causes the entire folder list to not be shown at all (the
"Loading..." <div> is shown instead):
DimpBase.js, line 1574:
parent_e = (parent_e) ? parent_e.down('UL') : $('normalfolders');
parent_e is set, however parent_e.down('UL') returns undefined.
Changing the function that is responsible for the id names of the HTML
tags so that dots in the folder names are replaced with underscores
appears to solve this problem.