Ticket #14279 (confirmed Bug)
portal_javascript "safe" compression is not so safe
Reported by: | keul | Owned by: | vangheem |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | JavaScript | Version: | 4.3 |
Keywords: | Cc: | keul |
Description (last modified by keul) (diff)
On Plone 4.3.3 I found an issue with portal_javascript compression.
The strange thing is that if I switch to compression "full" the error disappear, but if I use the common "safe" compression I get a syntax error.
The source file is not really clean, it contains some JSHint warning, but nothing really bad. Teh same if I take the source and I pre-process it using some JS compressor like jscompress.com: no errors at all.
This is the exact source that give me the error: https://github.com/RedTurtle/collective.tablepage/blob/c8cb1eeadf010b63a7059c0858ec55a4ec110bc9/collective/tablepage/browser/resources/jquery.dataTables.rowGrouping.js
Change History
comment:1 Changed 21 months ago by keul
- Owner set to vangheem
- Cc keul added
- Component changed from Unknown to JavaScript
comment:3 Changed 20 months ago by cwainwright
- Status changed from new to confirmed
Trying with the attached file, I confirm that a couple errors (below) did pop up with safe compression, and did not display on full compression. But I'm not sure this is something that needs to be fixed in Plone, since it's only happening with an added file.
SyntaxError: syntax error http://192.168.31.128:51000/Plone/portal_javascripts/Sunburst%20Theme/resourceplone.app.debugtoolbardebugtoolbar-cachekey-5b90acf01cf5b8ae80be5f7a0ac4e064.js Line 116
ReferenceError: _read_debug_cookie is not defined http://192.168.31.128:51000/Plone/food-h-c-331-393-7.jpg/view Line 7044
comment:4 Changed 20 months ago by keul
@cwainwright sorry I don't get what you meant with "it's only happening with an added file".