Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2019-12-18 13:252020-01-17 08:15
ReportermarvintmView Statuspublic 
Assigned Tocberner 
PrioritynormalResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revision1287a292a138
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0042595: StyleSheet components and StaticResource components do not follow the same criteria for development mode


- Both StyleSheetResourceComponents and StaticResourceComponents are cached if the system is not in development.
- Both components are added to the manifest for ServiceWorkers functionality for mobile applications
- StyleSheetResource uses the cache information to generate the eTag in case the component is cached
- Manifest component uses the isindevelopment implementation of the StaticResourceComponent to know if it should be empty (in development), or should contain all resources (not in development).

The main issue is that the implementation of the "isInDevelopment" method in StyleSheetResourceComponent and the StaticResourceComponent are not the same, and can return different results depending on the configuration of the system, and this can lead to very confusing behaviour.

The problem is not very serious, as it doesn't affect production instances and only affects developers, but it can be quite annoying if you are developing CSS changes and the WebPOS is not set as in development, and other modules are set as in development.
Steps To ReproduceThe confusing behaviour we got was the following:
- We had an instance with a module which depended on the WebPOS set as in development. The rest of the modules were set as not in development.
- The StaticResourceComponent (correctly) considered that the instance was in development. The WebPOS was shown in development, the manifest was empty, and if the developer did a change in a js file, and refreshed the page, the JS file would be regenerated.
- However, the StyleSheetResourceComponent request, although it was triggered and reached the backend, returned 304 (not modified), because the eTag did not change.
- The reason for this is that the CSS was cached, and the eTag always returned the same checksum.

This was quite confusing because even though the system was in development, in order to test CSS changes you had to restart Tomcat everytime, which was quite annoying.
Proposed SolutionI think we should just follow the same criteria to decide if the system is in development in all parts of the application. In particular, I think the criteria currently followed by the StyleSheetCriteria is wrong, and the same criteria currently used by the StaticResourceComponent should be followed.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0042792 closedcberner API Change: Remove custom isIndevelopment method from some BaseTemplateComponent classes 

-  Notes
cberner (developer)
2019-12-30 16:35

Being tracked in this merge request: [^]
hgbot (developer)
2020-01-14 13:23

Repository: erp/devel/pi
Changeset: 1287a292a1382d75c533cc758fcf3b473cfecd25
Author: Cristian Berner <cristian.berner <at>>
Date: Wed Jan 08 12:48:53 2020 +0100
URL: [^]

Fixes BUG-42595: Don't cache StyleSheets if any module in development

Previously StyleSheets were cached if working on a module and there weren't any other module with CSS set to inDevelopment

Behaviour for checking if instance is in development is now the same for both StyleSheetResourceComponent and StaticResourceComponent. It follows BaseComponent isInDevelopment logic, if a module is in development, all the instance is in development.

M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/
hgbot (developer)
2020-01-14 13:23

Repository: erp/devel/pi
Changeset: 82de1963f8ba67943052301c118704352a9cae3f
Author: Cristian Berner <cristian.berner <at>>
Date: Wed Jan 08 13:52:10 2020 +0100
URL: [^]

Related to ISSUE-42595: Apply same isInDevelopment logic for caching

Caching of resources should be the same across all BaseComponents, with some small exceptions. BaseComponent isInDevelopment method should be used instead of new private methods.

M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/
hgbot (developer)
2020-01-14 13:30

Repository: erp/pmods/
Changeset: bb55eaef132d29427a345d872ca8626dd335dfa8
Author: Cristian Berner <cristian.berner <at>>
Date: Thu Jan 09 16:46:38 2020 +0100
URL: [^]

Related to ISSUE-42595: Use same isInDevelopment logic for caching

M src/org/openbravo/mobile/core/
M src/org/openbravo/mobile/core/
caristu (developer)
2020-01-17 08:15


- Issue History
Date Modified Username Field Change
2019-12-18 13:25 marvintm New Issue
2019-12-18 13:25 marvintm Assigned To => platform
2019-12-18 13:25 marvintm Modules => Core
2019-12-18 13:25 marvintm Triggers an Emergency Pack => No
2019-12-18 13:32 marvintm Steps to Reproduce Updated View Revisions
2019-12-18 13:32 marvintm Proposed Solution updated
2019-12-18 13:33 marvintm Description Updated View Revisions
2019-12-18 13:34 marvintm Steps to Reproduce Updated View Revisions
2019-12-30 16:27 cberner Assigned To platform => cberner
2019-12-30 16:27 cberner Status new => acknowledged
2019-12-30 16:27 cberner Status acknowledged => scheduled
2019-12-30 16:29 cberner Review Assigned To => caristu
2019-12-30 16:35 cberner Note Added: 0116576
2020-01-10 08:51 cberner Relationship added causes 0042792
2020-01-14 13:23 hgbot Checkin
2020-01-14 13:23 hgbot Note Added: 0116852
2020-01-14 13:23 hgbot Status scheduled => resolved
2020-01-14 13:23 hgbot Resolution open => fixed
2020-01-14 13:23 hgbot Fixed in SCM revision => [^]
2020-01-14 13:23 hgbot Checkin
2020-01-14 13:23 hgbot Note Added: 0116853
2020-01-14 13:30 hgbot Checkin
2020-01-14 13:30 hgbot Note Added: 0116855
2020-01-17 08:15 caristu Note Added: 0116966
2020-01-17 08:15 caristu Status resolved => closed
2020-01-17 08:15 caristu Fixed in Version => 3.0PR20Q2

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker