Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041093
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2019-06-13 18:012019-06-21 14:42
ReportercaristuView Statuspublic 
Assigned Tojarmendariz 
PriorityimmediateResolutionfixedFixed in Version3.0PR19Q3
StatusclosedFix in branchFixed in SCM revision5fd4f84539e6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2019-11-12
Regression introduced in releasepi
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041093: JS static resources are not correctly minimized

DescriptionThe JS static resources are not correctly minimized.

It seems that JSMin is not able to minimize the code in ob-utilities.js file after this change[1]

[1]https://code.openbravo.com/erp/devel/pi/diff/a3916b3d436d/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js#l1.846 [^]
Steps To Reproduce1- Start tomcat having no modules in development status. Also make sure that there is not any JS file generated in WebContent/web/js/gen.
2- The following error appears in the log:
2019-06-13 16:58:47,011 [http-nio-8080-exec-5] ERROR org.openbravo.client.kernel.JSCompressor - Unterminated string literal at line 4617 and column 0
net.matthaynes.jsmin.JSMin$UnterminatedStringLiteralException: Unterminated string literal at line 4617 and column 0
    at net.matthaynes.jsmin.JSMin.action(Unknown Source) ~[jsmin.0.2.4.jar:?]
    at net.matthaynes.jsmin.JSMin.jsmin(Unknown Source) ~[jsmin.0.2.4.jar:?]
    at org.openbravo.client.kernel.JSCompressor.compress(JSCompressor.java:59) [classes/:?]
    at org.openbravo.client.kernel.StaticResourceComponent.getStaticResourceFileName(StaticResourceComponent.java:327) [classes/:?]
    at org.openbravo.client.kernel.StaticResourceComponent.generate(StaticResourceComponent.java:109) [classes/:?]
    at org.openbravo.client.kernel.ComponentGenerator.generate(ComponentGenerator.java:58) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.processComponentRequest(KernelServlet.java:264) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:209) [classes/:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) [servlet-api.jar:?]
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:200) [openbravo-core.jar:?]
3- Tomcat starts but note that the JS content is not minimized
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 0039983 closedjarmendariz Upgrade javascript linter and formatter 
related to defect 0042475 closedalostale Openbravo JS minimizer does not work well with template literals 

-  Notes
(0112811)
hgbot (developer)
2019-06-17 11:37

Repository: erp/devel/pi
Changeset: 5fd4f84539e6a4754dad0666bcfb9a4ee4ab9e53
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Mon Jun 17 11:35:38 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5fd4f84539e6a4754dad0666bcfb9a4ee4ab9e53 [^]

Fixed issue 41093: JS static resources are not correctly minimized

Changes in format and escaping in regular expressions made JSMin to not
parse properly javascript files. This commid adds missing parentheses wrapping
regexes (removed by prettier) and adding a scaping character removed by ESLint.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
(0112841)
hudsonbot (developer)
2019-06-17 19:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/2ad95dac1570 [^]
Maturity status: Test
(0112945)
caristu (developer)
2019-06-21 14:42

Reviewed + tested OK.

- Issue History
Date Modified Username Field Change
2019-06-13 18:01 caristu New Issue
2019-06-13 18:01 caristu Assigned To => jarmendariz
2019-06-13 18:01 caristu Modules => Core
2019-06-13 18:01 caristu Regression introduced in release => pi
2019-06-13 18:01 caristu Triggers an Emergency Pack => No
2019-06-13 18:01 caristu Issue generated from 0039983
2019-06-13 18:01 caristu Relationship added caused by 0039983
2019-06-13 18:02 caristu Regression level => Pre packaging ( pi )
2019-06-13 18:02 caristu Regression date => 2019-11-12
2019-06-14 11:58 jarmendariz Status new => scheduled
2019-06-17 11:37 hgbot Checkin
2019-06-17 11:37 hgbot Note Added: 0112811
2019-06-17 11:37 hgbot Status scheduled => resolved
2019-06-17 11:37 hgbot Resolution open => fixed
2019-06-17 11:37 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5fd4f84539e6a4754dad0666bcfb9a4ee4ab9e53 [^]
2019-06-17 11:41 jarmendariz Review Assigned To => caristu
2019-06-17 19:39 hudsonbot Checkin
2019-06-17 19:39 hudsonbot Note Added: 0112841
2019-06-21 14:42 caristu Note Added: 0112945
2019-06-21 14:42 caristu Status resolved => closed
2019-06-21 14:42 caristu Fixed in Version => 3.0PR19Q3
2019-12-05 12:15 alostale Relationship added related to 0042475


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker