6.0.0-beta1
7/19/25

[#8267] DIMP preview errors in folders other than Inbox
Summary DIMP preview errors in folders other than Inbox
Queue DIMP
Queue Version 1.1.2
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester simon (at) simonandkate (dot) net
Created 05/13/2009 (5911 days ago)
Due
Updated 10/30/2009 (5741 days ago)
Assigned 05/14/2009 (5910 days ago)
Resolved 06/08/2009 (5885 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/30/2009 11:06:44 AM simon (at) simonandkate (dot) net Comment #32 Reply to this comment
Thanks Martin.
10/30/2009 09:02:20 AM linuxbox (at) wavenet (dot) at Comment #31 Reply to this comment
From my experience the latest dimp version does not have

this issue any more - we have the expected preview behaviour

in firefox 3.5.x



regards

Martin
10/29/2009 11:14:14 PM simon (at) simonandkate (dot) net Comment #30 Reply to this comment
Michael, has this been included in 1.1.3? I can't see it in any of the 
change documentation...?



Just would like to know whether I will need to reapply the CVS change 
that is noted in this ticket after I update Dimp to 1.1.3.
07/21/2009 02:18:00 PM Michael Slusarz Comment #29 Reply to this comment
The message list ViewPort contains elements with DOM IDs of the form
vp_row[UID][MAILBOX]. For subfolders these look like
'vp_row1234Lists/Horde', i.e. invalid HTML ID (cannot contain
forward-slash). This breaks Prototype in Selector.findElements, for
browsers that implement Selectors API.
Your solution is a workaround, not a fix.  The solution in CVS is the 
correct fix - it does not assume that you have to do tweaking of DOM 
IDs in the future, if any further changes are made to the CVS code.
07/21/2009 08:49:49 AM simon (at) abominable (dot) org (dot) uk Comment #28 Reply to this comment
Martin, for production use you are better off with the fix in CVS 
mentioned below - I think there are other issues introduced when the 
Selectors API is used. The CVS fix also includes a new compressed js 
so you don't need to mess around with paths.



DIMP uses the compressed js by default (i.e. not the one in src/); 
instructions for changing this are in dimp/docs/INSTALL.
07/21/2009 06:46:38 AM linuxbox (at) wavenet (dot) at Comment #27 Reply to this comment
Thank you for your response,



does dimp uses the js/ViewPort.js (where I can't find the lines with 
e.domid) or

does dimp use the js/src/ViewPort.js?

(do I have to compile it somehow after changing in the src)?



regards

Martin
07/20/2009 11:32:08 PM simon (at) abominable (dot) org (dot) uk Comment #26 Reply to this comment
I encountered same issue in stable DIMP (1.1.2) with FF3.5, and found 
what I think is the cause (annoyingly I only found this ticket 
afterwards - otherwise I'd have just applied the fix from CVS!).



The message list ViewPort contains elements with DOM IDs of the form 
vp_row[UID][MAILBOX]. For subfolders these look like 
'vp_row1234Lists/Horde', i.e. invalid HTML ID (cannot contain 
forward-slash). This breaks Prototype in Selector.findElements, for 
browsers that implement Selectors API.



Replacing non-word characters (as is done elsewhere in DIMP) fixed it 
for me, i.e:



--- ViewPort-old.js        2009-07-20 23:16:35.000000000 +0100

+++ ViewPort.js        2009-07-20 22:48:50.000000000 +0100

@@ -1253,7 +1253,7 @@

              if (!Object.isUndefined(e)) {

                  // We can directly write the rownum to the original object

                  // since we will always rewrite when creating rows.

-                e.domid = 'vp_row' + u;

+                e.domid = 'vp_row' + 
u.replace(/_/g,'__').replace(/\W/g, '_');

                  e.rownum = this.uidlist.get(u);

                  e.vp_id = u;

                  return e;



I'd take a look at IMP 5 to see how this got fixed, but horde.org 
seems broken at the moment...
07/20/2009 08:58:23 AM linuxbox (at) wavenet (dot) at Comment #25 Reply to this comment
Hi!



Can anyone please explain to a non Javascript -Dom expert, how I could

get dimp work again with firefox3.5 clients

(we are suffering the same "other folder than inbox" issue)



Thank you!



regards

martin
06/09/2009 06:03:41 AM simon (at) simonandkate (dot) net Comment #24 Reply to this comment
Confirm, this resolves the issue in FF 3.5b4 on Vista, and on Chrome.   
CVS changes applied, and Dimp config set back to normal...



Dimp once again usable for me... :) Thanks Michael.
06/08/2009 08:49:44 PM Michael Slusarz Comment #23
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
On further review... this issue had arisen on one of my client's 
installations.  It indeed has something to do with the SelectorsAPI - 
I'm not sure if it is broken in prototypejs or Webkit.  Regardless, 
the workaround is to tell prototypejs not to use the SelectorsAPI.   
Seems to work for me.



Strange, especially since there isn't an issue in IMP 5.  It must have 
something to do with the other elements in the page also - somewhere 
along the line, something changed in IMP 5 where this bug doesn't 
manifest itself anymore.  Since I'm not going to spend anymore time 
tracking this down in DIMP 1.x, this solution will do.
06/02/2009 07:05:06 PM Michael Slusarz Comment #21
State ⇒ Stalled
Reply to this comment
Thanks Michael...

So you can't verify this in FF 3.5b4? Does it for me on multiple PCs
with FF 3.5b4...
Correct.  I can not reproduce with 3.5b4 (I have only tested on Win7).
So I guess this gets closed as not being a Horde / Dimp issue?
No - we still need to track.  But this is something that needs to be 
fixed upstream (in either the browser or prototypejs) so there's 
nothing we can do right now.
05/31/2009 08:00:17 AM simon (at) simonandkate (dot) net Comment #20 Reply to this comment
Thanks Michael...



So you can't verify this in FF 3.5b4? Does it for me on multiple PCs 
with FF 3.5b4...



So I guess this gets closed as not being a Horde / Dimp issue?
05/31/2009 03:48:01 AM Michael Slusarz Comment #19 Reply to this comment

[Show Quoted Text - 20 lines]
Verified on Chrome 2 (not Chrome 1).  Either Chrome 2 or prototypejs 
is broken - this is the line that isn't working properly (in 
_addMouseEvents in DimpBase.js):



elt = $(p.id).down('div.msCheck')



It is the selector 'div.msCheck' that is broken on Chrome - it returns 
an undefined value instead of a DOM element (a DIV element of class 
'msCheck' does exist).



Simply put, this is not a Horde/IMP/DIMP issue.
05/29/2009 05:43:39 AM Michael Slusarz Comment #18 Reply to this comment
Also, the older Firefox's don't do it. I tried 3.0.8, 3.0.9, and
3.0.10 on some different PCs and 3.0.5 on the same PC as 3.5 runs on,
and none of them do it. FF3.5 and Chrome both do have the problem.
DIMP 1.1.2 doesn't support FF 3.5.  This is almost certainly a
prototypejs issue since that is the js library responsible for all
the fancy attribute matching.
On further testing, DIMP 1.1.x works just fine on FF 3.5b4 (Windows 7) 
and Chrome (WinXP).



Further analysis of the error message provided (Expected 
identifier...) indicates this is an internal issue with firebug (it is 
thrown by the xulrunner stuff) rather than anything that should/would 
be affecting DIMP.



The unfortunate reality is, without a reliable way to reproduce and/or 
patch, this bug will need to be closed especially since I can not 
reproduce on anything resembling a stable browser (I do not yet 
consider Chrome stable).
05/29/2009 05:27:46 AM Michael Slusarz Comment #17 Reply to this comment
Also, the older Firefox's don't do it. I tried 3.0.8, 3.0.9, and
3.0.10 on some different PCs and 3.0.5 on the same PC as 3.5 runs on,
and none of them do it. FF3.5 and Chrome both do have the problem.
DIMP 1.1.2 doesn't support FF 3.5.  This is almost certainly a 
prototypejs issue since that is the js library responsible for all the 
fancy attribute matching.
05/22/2009 12:55:20 PM simon (at) simonandkate (dot) net Comment #16 Reply to this comment
Firefox's Error Console gives me this info only:



Warning: Expected identifier or string for value in attribute selector 
but found '1'.

Source File: https://mail.simonandkate.net/horde/dimp/

Line: 0



Also, the older Firefox's don't do it. I tried 3.0.8, 3.0.9, and 
3.0.10 on some different PCs and 3.0.5 on the same PC as 3.5 runs on, 
and none of them do it. FF3.5 and Chrome both do have the problem.
05/22/2009 12:01:28 PM simon (at) simonandkate (dot) net Comment #15 Reply to this comment
By trial and error (with no Firebug for Firefox 3.5 it makes it hard) 
the "elt" error is returned from the JS source file DimpBase.js. 
(Worked that out by replacing each JS file one at a time with the 
source one, changing the path so caching didn't work, and reloading 
Dimp).



Will try and dig into the js and see if I can work out a way to find 
out where it's spitting about the 'elt' variable without Firebug.
05/22/2009 10:34:24 AM simon (at) simonandkate (dot) net Comment #14 Reply to this comment
OK, I tried the following:



$this->applications['dimp'] = array(

     'fileroot' => dirname(__FILE__) . '/../dimp',

     'webroot' => $this->applications['horde']['webroot'] . '/dimp',

     'name' => _("Dynamic Mail"),

     'status' => 'notoolbar',

     'target' => '_parent',

     'jsuri' => $this->applications['horde']['webroot'] . '/dimp/js/src',

     'jsfs' => '/usr/share/horde/dimp/js/src',

);



And Dimp loaded.



The error when going into any folder other than inbox is:



"onException: TypeError-elt is undefined"



**Note that Dimp troubleshooting instructions for this step are currently:



"Finally, you need to change ``horde/conf/registry.php`` to serve the

javascript files from the ``js/src/`` directory rather than the ``js/``

directory". That's about as useful as telling most people to fly to 
the moon without at the very least an example of how to do it... :)



Can I submit a patch for the INSTALL file with some better instructions LOL?
05/22/2009 10:08:01 AM simon (at) simonandkate (dot) net Comment #13 Reply to this comment
Thank you Jan. With respect, to most people other than developers 
(which nowhere in this bug have I claimed to be) a URI is a naming 
structure like http://www.something. In that context I know fine what 
a URI is - but thanks... :) Do I need to tell you everything else I 
don't know? (joke...).



"$this->applications['horde']['webroot'] . '/dimp/js/src'" does not 
look like what a non-developer would call a URI.



I'm trying here to help the Dimp community by debugging an error that 
occurs in certain browsers on my install. To do that, all I need from 
you guys (the developers) is what I put in registry.php to make Dimp 
get its JS from source.



I followed Michael's advice to "Add something like this to the dimp 
config in horde/config/registry.php:

      'jsuri' => '/path/to/horde/js/src',

      'jsfs' => dirname(__FILE__) . '/../js/src',"



Then something different from you, and now something different again.



Can someone please just tell me what I put in 
/usr/share/horde/config/registry.php to make Dimp get its JS from src.



Currently I have:



$this->applications['dimp'] = array(

     'fileroot' => dirname(__FILE__) . '/../dimp',

     'webroot' => $this->applications['horde']['webroot'] . '/dimp',

     'name' => _("Dynamic Mail"),

     'status' => 'notoolbar',

     'target' => '_parent',

     'jsuri' => dirname(__FILE__) . '/../dimp/js/src',

     'jsfs' => '/usr/share/horde/dimp/js/src',

);



With your last post, are you now telling me that I also need to change 
the line that says:



    'webroot' => $this->applications['horde']['webroot'] . '/dimp',



to



   'webroot' => $this->applications['horde']['webroot'] . '/dimp/js/src'  ?



Or change that INSTEAD of the others, or as well as some of them...?



As I said in Comment 4:



"Happy to do more JS troubleshooting if someone can help point me in

the right direction of how to actually do it as the tips in the

INSTALL file don't work for me..."
05/22/2009 09:21:16 AM Jan Schneider Summary ⇒ DIMP preview errors in folders other than Inbox
 
05/22/2009 09:07:22 AM Jan Schneider Comment #12
Summary ⇒ DIMP preview errors in folders other than Inboxou
Reply to this comment
You should have mentioned that you don't know what an URI is.

Try:

$this->applications['horde']['webroot'] . '/dimp/js/src'
05/22/2009 01:10:08 AM simon (at) simonandkate (dot) net Comment #11 Reply to this comment
OK, so can either of you tell me definitively what I am supposed to 
put there? :)



From what I read in registry.php jsuri should be a URI, jsfs should 
be a filesystem path.



I have tried:



(on Michael's advice)

'jsuri' => '/usr/share/horde/dimp/js/src',

'jsfs' => dirname(__FILE__) . '/../dimp/js/src',



(on Jan's advice)

'jsuri' => dirname(__FILE__) . '/../dimp/js/src',

'jsfs' => dirname(__FILE__) . '/../dimp/js/src',



and finally just for the hell of it:

'jsuri' => dirname(__FILE__) . '/../dimp/js/src',

'jsfs' => '/usr/share/horde/dimp/js/src',



None of them work - Dimp just sits and says "loading..."



And yes, I have a /usr/share/horde/dimp/js/src directory.




05/22/2009 12:45:04 AM Jan Schneider Comment #10 Reply to this comment
     'jsuri' => '/usr/share/horde/dimp/js/src',
This is not an URI. It's a file system path, and probably the same like jsfs.
     'jsfs' => dirname(__FILE__) . '/../dimp/js/src',
05/21/2009 11:17:11 PM simon (at) simonandkate (dot) net Comment #9 Reply to this comment
Registry.php now reads:



$this->applications['dimp'] = array(

     'fileroot' => dirname(__FILE__) . '/../dimp',

     'webroot' => $this->applications['horde']['webroot'] . '/dimp',

     'name' => _("Dynamic Mail"),

     'status' => 'notoolbar',

     'target' => '_parent',

     'jsuri' => '/usr/share/horde/dimp/js/src',

     'jsfs' => dirname(__FILE__) . '/../dimp/js/src',

);



No change - with the jsuri and jsfs lines in Dimp never loads.



Take them out and it loads fine, albeit still with the issue as noted 
in this bug.
05/21/2009 10:33:32 PM Michael Slusarz Comment #8 Reply to this comment
     'jsuri' => '/usr/share/horde/js/src',
Probably needs to be: /usr/share/horde/dimp/js/src
     'jsfs' => dirname(__FILE__) . '/../js/src',
Probably needs to be: dirname(__FILE__) . '/../dimp/js/src',
05/21/2009 10:24:20 PM simon (at) simonandkate (dot) net Comment #7 Reply to this comment
OK, my registry.php entry for Dimp now reads as follows:



$this->applications['dimp'] = array(

     'fileroot' => dirname(__FILE__) . '/../dimp',

     'webroot' => $this->applications['horde']['webroot'] . '/dimp',

     'name' => _("Dynamic Mail"),

     'status' => 'notoolbar',

     'target' => '_parent',

     'jsuri' => '/usr/share/horde/js/src',

     'jsfs' => dirname(__FILE__) . '/../js/src',

);





And now Dimp doesn't work at all LOL... Just sits there saying "Loading...."
05/19/2009 01:04:52 AM Simon (at) simonandkate (dot) net Comment #6 Reply to this comment
"onException: TypeError-a is undefined"
You don't happen to be running IMP 5.0 (from git) on the same server,
are you?
No. Horde 3.3.4 and the latest stable Imp and Dimp. No git apps on the server.

[Show Quoted Text - 13 lines]
Will try that tonight. Thanks.
05/18/2009 11:04:41 PM Michael Slusarz Comment #5 Reply to this comment
"onException: TypeError-a is undefined"
You don't happen to be running IMP 5.0 (from git) on the same server, are you?

[Show Quoted Text - 9 lines]
Add something like this to the dimp config in horde/config/registry.php:

     'jsuri' => '/path/to/horde/js/src',

     'jsfs' => dirname(__FILE__) . '/../js/src',
05/16/2009 01:34:16 PM simon (at) simonandkate (dot) net Comment #4 Reply to this comment
I turned on debugging in dimp/config/conf.php.



When navigating into any folder other than Inbox using Firefox the 
following error pops up in a box:



"onException: TypeError-a is undefined"



In Chrome the error is:



"onException: TypeError-"



The Dimp troubleshooting guide says to:



"change ``horde/conf/registry.php`` to serve the

javascript files from the ``js/src/`` directory rather than the ``js/``

directory"



Assuming it is supposed to be horde/config/registry.php, there is no 
setting for js path that I could see in the file... how do I make it 
use the source js?



There is no Firebug for Firefox 3.5.



Happy to do more JS troubleshooting if someone can help point me in 
the right direction of how to actually do it as the tips in the 
INSTALL file don't work for me...
05/15/2009 04:03:36 AM simon (at) simonandkate (dot) net Comment #3 Reply to this comment
Please read the 'DIMP Troubleshooting' section in dimp/docs/INSTALL.
Cool, I will follow the troubleshooting steps there.



Interestingly I discovered it doesn't do it in IE7. I so rarely use it 
these days... Firefox and Chrome do it though.
05/14/2009 05:17:26 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Please read the 'DIMP Troubleshooting' section in dimp/docs/INSTALL.
05/13/2009 01:04:21 AM simon (at) simonandkate (dot) net Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ DIMP
Type ⇒ Bug
Summary ⇒ DIMP preview errors in folders other than Inbox
Reply to this comment
Dimp 1.1.2 in Horde 3.3.4-RC1.



Firefox and Chrome, same behaviour.



In Dimp, the Inbox behaves correctly. I.e. open Dimp, the Inbox shows 
preview of the first email item, and other items can be selected and 
automatically the preview appears. Multiple items can be selected by 
using the select box on the left of the emails.



However in other folders, upon opening the folder (Sent Items, Spam, 
or user-created subfolders etc) the automatic preview of the first 
item does not appear. The turning "loading" symbol appears. Clicking 
on the first email previews it, but no other emails in the folder are 
selectable or previewable. Double-clicking on another email opens it 
in a new window, so Dimp can 'see' and read the other emails. The 
'loading' spinning wheel doesn't appear to time out - I have left it 
for about 15 minutes.



As I assume this is basic functionality that works for most people, I 
must have something in my config / setup that Dimp doesn't like...




Saved Queries