6.0.0-beta1
7/3/25

[#14337] SyntaxHighlighter mime viewer broken in IMP using dynamic view.
Summary SyntaxHighlighter mime viewer broken in IMP using dynamic view.
Queue IMP
Queue Version 6.2.14
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester samuel.wolf (at) wolf-maschinenbau (dot) de
Created 04/26/2016 (3355 days ago)
Due
Updated 07/11/2016 (3279 days ago)
Assigned 04/27/2016 (3354 days ago)
Resolved 07/11/2016 (3279 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/11/2016 09:15:42 PM Michael Rubinsky Comment #13
Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
Reply to this comment
Fixed in Git:

For FRAMEWORK_5_2, stops the javascript errors when loading email that 
would use the MIME viewer. The part will highlight correctly in the 
preview only the first time it is loaded, but not when returning to 
the email after loading another email's preview. However, it will 
always render correctly when loading the message in a separate window.

For master (Horde 5.3/6) same as above except the part will always be 
highlighted correctly.
04/29/2016 07:36:12 PM Michael Rubinsky Comment #12
Summary ⇒ SyntaxHighlighter mime viewer broken in IMP using dynamic view.
Reply to this comment
Not limited to xml files.

This is a general issue with the way the SyntaxHighter Mime Viewer is 
loaded via ajax.
04/27/2016 08:47:21 PM Michael Rubinsky Comment #11 Reply to this comment
Great. This is due to the way the third party syntaxhightlighter 
package is structured and loads it's javascript files. It's 
problematic in our Ajax context because we don't currently have any 
way of specifying code to run after newly added script files are done 
loading.

I've gotten closer, but the way we load this library needs to be 
rewritten to work via our Ajax loader.
04/27/2016 03:46:34 PM Michael Rubinsky Comment #10 Reply to this comment
Thanks, this is what I needed. My sample emails had disposition of 
attachment, edited it to be 'inline' and now I see what is happening.
04/27/2016 02:29:21 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #9 Reply to this comment
Any chance you can send me an email that triggers this?
Unfortunately not the original mail :(
I try to copy it and remove the text/html content, but not the .xml 
attachment.
Now I don't get a error, with other words the .xml file is *not* the problem.

Maybe it's time to cancel the ticket and wait for a newer Firefox version?

Some snip of the header:
Content-Type: multipart/mixed; boundary="----------=_1448297091-3720-1"

This is a multi-part message in MIME format...

------------=_1448297091-3720-1
Content-Type: multipart/alternative; boundary="----------=_1448297091-3720-0"

This is a multi-part message in MIME format...

------------=_1448297091-3720-0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sehr geehrter Herr Wolf,
[...]
------------=_1448297091-3720-0
Content-Type: text/html; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

<html><head><!--a75c305b1c0a6022--><meta http-equiv="Content-Type" 
content="text/html; charset=utf-8"/></head><body 
style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif; 
font-size: 13px;">Sehr geehrter Herr Wolf,<br />
<br />
[...]
------------=_1448297091-3720-1
Content-Type: text/xml; name="template.xml"
Content-Disposition: inline; filename="template.xml"
Content-Transfer-Encoding: 7bit

<?xml version="1.0" encoding="ISO-8859-1"?>
[...]
04/27/2016 02:08:55 PM Michael Rubinsky Comment #8 Reply to this comment
Any chance you can send me an email that triggers this?
04/27/2016 02:06:39 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de New Attachment: first_click_on_the_mail.png Download
 
04/27/2016 01:58:28 PM Michael Rubinsky Comment #7 Reply to this comment
Oh well, back to code tracing :)
It is not so easy to reproduce, here are the steps:
* horde login
* open mail subfolder xy
* click on the mail with the .xml attachment --> *no* error!
* click on another mail without attachment
* click again on the mail with the .xml attachment --> ERROR
Still not reproducible. Dynamic or Basic mode. No error when loading 
email preview, loading full email, or clicking on attachment. I'm 
still not even getting the javascript loading though, so there is no 
javascript to run...of course, the syntax still isn't being 
highlighted though.
04/27/2016 01:42:15 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #6 Reply to this comment
Oh well, back to code tracing :)
It is not so easy to reproduce, here are the steps:
* horde login
* open mail subfolder xy
* click on the mail with the .xml attachment --> *no* error!
* click on another mail without attachment
* click again on the mail with the .xml attachment --> ERROR

04/27/2016 01:29:59 PM Michael Rubinsky Comment #5 Reply to this comment
Though, now that I've upgraded I still don't see this behavior. Oh 
well, back to code tracing :)
04/27/2016 12:08:24 PM Michael Rubinsky Comment #4 Reply to this comment
Ah. That explains the difference I'm seeing. I was still on FF 45.0.2.
04/27/2016 08:39:39 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #3 Reply to this comment
You should have a file in 
horde/js/syntaxhighlighter/scripts/shBrushXml.js ... is this there?
Yes:
root@mail:/var/www/https/horde/js/syntaxhighlighter/scripts# md5sum 
shBrushXml.js
ba290ac0111d2c3f8e1ce36fbaf6a239  shBrushXml.js

I guess the issue coming with the Firefox 46 update (there was a lot 
of changes in js).
Firefox bug?
Chromium 50 does not show this issue.
04/27/2016 04:47:25 AM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Hm. For me, there seems to be some issue in outputing the javascript 
files when loading the mime viewer. However, this would result in the 
syntax not being highlighted, not the javascript pop up. I'll have to 
look deeper to see why this is happening.

You should have a file in 
horde/js/syntaxhighlighter/scripts/shBrushXml.js ... is this there?
04/26/2016 04:05:17 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #1
State ⇒ Unconfirmed
New Attachment: horde_imp_error.png Download
Patch ⇒ No
Milestone ⇒
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Mail with attached .xml file - SyntaxHighlighter error
Queue ⇒ IMP
Reply to this comment
"SyntaxHighlighter" error as soon I click on a mail (for preview) with 
a attached .xml file.

Saved Queries