Bug 793687 (JBEPP-763)

Summary: Javascript not working with exo.product.developing=false
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Martin Weiler <mweiler>
Component: PortalAssignee: hfnukal <hfnukal>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.1.0.GACC: epp-bugs, theute
Target Milestone: ---   
Target Release: 5.2.0.DEV02   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-763
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-09 23:35:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
emoticons.js none

Description Martin Weiler 2010-12-21 08:55:10 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000005fAOg
project_key: JBEPP

Attached javascript library works when the server is started with exo.product.developing=true.  When it is set false they don't.

Comment 1 Martin Weiler 2010-12-21 08:55:33 UTC
Link: Added: This issue is a dependency of GTNPORTAL-1182


Comment 2 Martin Weiler 2010-12-21 08:55:53 UTC
Attachment: Added: emoticons.js


Comment 3 Thomas Heute 2011-04-12 19:00:01 UTC
For a fix we would need a new Javascript compressor such as Google Closure, it requires significant changes and proper testing which would be more appropriate for a minor (5.2) release.

As a workaround it is possible to desactivate the Javascript compressor without falling back to development mode.
To do so:
1) Edit: gatein.ear/02portal.war/WEB-INF/conf/common/resource-compressor-configuration.xml and remove the following section:
<component-plugin>
            <name>JSMinCompressorPlugin</name>
            <set-method>registerCompressorPlugin</set-method>
            <type>org.exoplatform.portal.resource.compressor.impl.JSMinCompressorPlugin</type>
            <init-params>
               <value-param>
                  <name>plugin.priority</name>
                  <value>1</value>
               </value-param>
            </init-params>
         </component-plugin>
2) Delete the server/default/tmp directory

Note: on first load there will be WARNs in the log such as:
20:50:39,635 WARN [JavascriptConfigService] Error when generating minified javascript, will use normal javascript instead
org.exoplatform.portal.resource.compressor.ResourceCompressorException: There is no compressor for JAVASCRIPT type

Those can be ignored.

Comment 4 Thomas Heute 2011-04-12 19:05:28 UTC
Link: Added: This issue relates to JBEPP-884


Comment 5 Thomas Heute 2011-05-18 10:18:32 UTC
We should try with Google closure, See GTNPORTAL-198

Comment 6 hfnukal@redhat.com 2011-07-04 15:09:27 UTC
Already included from 5.1 branch

Comment 7 Thomas Heute 2011-07-04 15:23:55 UTC
There was a workaround in 5.1, this requires the solution to use an alternative Javascript compressing tool like Google closure.
See https://issues.jboss.org/browse/GTNPORTAL-198

Comment 8 hfnukal@redhat.com 2011-07-29 09:10:30 UTC
Link: Added: This issue relates to GTNPORTAL-198


Comment 9 Thomas Heute 2011-09-22 06:39:16 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 11 Jared MORGAN 2011-11-28 23:49:45 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Needs More Info
Release Notes Text: Added: CAUSE:

CONSEQUENCE:

FIX:

RESULT:
Primary SME: Added: hfnukal
NEEDINFO Due Date: Added: 30/Nov/11
NEEDINFO: Added: Subject Matter Expert


Comment 12 Thomas Heute 2011-12-01 08:04:41 UTC
Release Notes Docs Status: Removed: Needs More Info Added: Not Yet Documented
Release Notes Text: Removed: CAUSE:

CONSEQUENCE:

FIX:

RESULT: Added: CAUSE: EPP ships with a resource compressor (CSS and Javascript)

CONSEQUENCE: Some javascript files were incorrectly compressed and would break unless the developer mode was enabled which has performance side effects

FIX: The Javascript compressing engine has been replaced, and it's also possible to turn it off.

RESULT: The Javascript should always be able to work.


Comment 13 Jared MORGAN 2011-12-04 23:02:43 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Removed: CAUSE: EPP ships with a resource compressor (CSS and Javascript)

CONSEQUENCE: Some javascript files were incorrectly compressed and would break unless the developer mode was enabled which has performance side effects

FIX: The Javascript compressing engine has been replaced, and it's also possible to turn it off.

RESULT: The Javascript should always be able to work. Added: The platform ships with a resource compressor (CSS and Javascript). Some javascript files were incorrectly compressed and would break unless the developer mode was enabled. Enabling the developer mode introduced  performance side-effects. The Javascript compression engine has been replaced, and can be turned off if required, which fixes the issue.
NEEDINFO Due Date: Removed: 30/Nov/11 
NEEDINFO: Removed: Subject Matter Expert Added: Nobody