Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 2 ACE Liferay portlet 6
-
Affects:Compatibility/Configuration
Description
The new ACE components rely on YUI (both 2.8 and 3.1 currently). Liferay 6 has a UI layer called Alloy that is based on YUI 3.2. While it appears that YUI 2 and 3 can co-exist on a page, there currently appears to be a collision between the 2 different versions of YUI 3 when they are both loaded into the portal page. The initial rendering of the page dumps out an error to the JavaScript console of Firebug that says:
f.applyConfig is not a function
The Chrome JavaScript console supplies a stack trace:
Loading modules
barebone.jsp:1Uncaught TypeError: Object [object Object] has no method 'applyConfig'
YUI [barebone.jsp:1]
YUI [barebone.jsp:1]
ice.yui3.use [icefaces-2-ace:55]
(anonymous function) [icefaces-2-ace:83]
f.applyConfig is not a function
The Chrome JavaScript console supplies a stack trace:
Loading modules
barebone.jsp:1Uncaught TypeError: Object [object Object] has no method 'applyConfig'
YUI [barebone.jsp:1]
YUI [barebone.jsp:1]
ice.yui3.use [icefaces-2-ace:55]
(anonymous function) [icefaces-2-ace:83]
Issue Links
Activity
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.0-Beta2 [ 10242 ] | |
Assignee | Mircea Toma [ mircea.toma ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Component/s | ACE-Components [ 10050 ] | |
Component/s | Components [ 10012 ] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Fix Version/s | 2.0-Beta2 [ 10242 ] | |
Affects | [Compatibility/Configuration] | |
Priority | Major [ 3 ] | Critical [ 2 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Assignee Priority | P1 |
Deryk Sinotte
made changes -
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.1 [ 10241 ] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Assignee Priority | P1 |
Ken Fyten
made changes -
Summary | Conflicting versions of YUI 3 between ACE components and Liferay | Conflicting versions of YUI 3 between ACE components and Liferay 6 |
Environment | ICEfaces 2 ACE Liferay portlet | ICEfaces 2 ACE Liferay portlet 6 |
Salesforce Case | [] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Assignee | Mircea Toma [ mircea.toma ] | Ken Fyten [ ken.fyten ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.1-Beta2 [ 10294 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
After analyzing what is going on when 3.2.* and 3.1.* libraries are mixed I can tell now that is not quite possible to use them together. In the Liferay case the 3.2.0pr2 library is loaded first thus defining YUI variable and YUI.prototype methods. When 3.1.1 library is loaded later on the YUI variable is not redefined (see comment: "If YUI is already defined, the existing YUI object will not be overwritten so that defined namespaces are preserved."). But, the YUI.prototype is redefined when 3.1.1 library is loaded. So when you invoke YUI function the 3.2.0pr2 function code tries to invoke a method defined on the YUI.prototype: YUI.prototype.applyConfig. Unfortunately the 'applyConfig' function does not exists anymore because 3.1.1 library replaced the YUI prototype.