RE: Error browsr console Uncaught TypeError: PrimeFaces.isIE is not a funct

thumbnail
Sachin J, modified 7 Years ago. New Member Posts: 21 Join Date: 10/9/15 Recent Posts

Hi All,

 

I have migrated Liferay 6.2 developed JSF portlet to DXP compatible portlet and once I have deployed on DXP server instance every functionality is working absolutely fine except the UI (Look and Feel).

 

When I drag the portlet on the page with applied custom Liferay DXP theme it showing exception on browser console as below mentioned logs 

 


Uncaught TypeError: PrimeFaces.isIE is not a function
    at c.initSize (home?p_p_id=RecycleBinportlet_WAR_RecycleBinportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=&p_p_col_count=0&_RecycleBinportlet_WAR_RecycleBinportlet_javax.faces.resource=components.js&_RecycleBinportlet_WAR_RecycleBinportlet_ln=primefaces&_RecycleBinportlet_WAR_RecycleBinportlet_v=6.1:13)
    at c.init (home?p_p_id=RecycleBinportlet_WAR_RecycleBinportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=&p_p_col_count=0&_RecycleBinportlet_WAR_RecycleBinportlet_javax.faces.resource=components.js&_RecycleBinportlet_WAR_RecycleBinportlet_ln=primefaces&_RecycleBinportlet_WAR_RecycleBinportlet_v=6.1:13)
    at c.e.(anonymous function) [as init] (http://localhost:8080/group/guest/home?p_p_id=BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=4&p_p_col_pos=2&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_javax.faces.resource=core.js&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_ln=primefaces&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_v=6.2:5:335)
    at c.init (home?p_p_id=RecycleBinportlet_WAR_RecycleBinportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=&p_p_col_count=0&_RecycleBinportlet_WAR_RecycleBinportlet_javax.faces.resource=components.js&_RecycleBinportlet_WAR_RecycleBinportlet_ln=primefaces&_RecycleBinportlet_WAR_RecycleBinportlet_v=6.1:13)
    at c.e.(anonymous function) [as init] (http://localhost:8080/group/guest/home?p_p_id=BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=4&p_p_col_pos=2&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_javax.faces.resource=core.js&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_ln=primefaces&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_v=6.2:5:335)
    at new c (home?p_p_id=BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=4&p_p_col_pos=2&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_javax.faces.resource=core.js&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_ln=primefaces&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_v=6.2:5)
    at Object.createWidget (home?p_p_id=BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=4&p_p_col_pos=2&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_javax.faces.resource=core.js&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_ln=primefaces&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_v=6.2:1)
    at Object.cw (home?p_p_id=BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=4&p_p_col_pos=2&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_javax.faces.resource=core.js&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_ln=primefaces&_BookmarksPortlet_WAR_bookmarksportlet_INSTANCE_d2xnfHdGusWa_v=6.2:1)
    at HTMLDocument.<anonymous> (guest:12)
    at i (home?p_p_id=RecycleBinportlet_WAR_RecycleBinportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=&p_p_col_count=0&_RecycleBinportlet_WAR_RecycleBinportlet_javax.faces.resource=jquery%2Fjquery.js&_RecycleBinportlet_WAR_RecycleBinportlet_ln=primefaces&_RecycleBinportlet_WAR_RecycleBinportlet_v=6.1:25)

 

 

Migarted portlet works fine with classis theme ie. default theme, issue with only custo theme.

 

 

Thanks in advance :)

 

Regards,

Sachin Jagtap

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Sachin,
Please provide the versions of all Liferay Faces and JSF libraries that you are using. Please also provide the shortest simplest portlet (and theme if necessary) that will reproduce your issue. It will probably be easiest to generate a simple PrimeFaces portlet using the mvn archetype:generate command found at liferayfaces.org. From there you can add your code until the problem is reproduced.

- Kyle

thumbnail
Sachin J, modified 7 Years ago. New Member Posts: 21 Join Date: 10/9/15 Recent Posts

Hi Kyle,

 

Thanks for your replies but the issue was resolved by setting/configured below mentioned configuration in web.xml,

  <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>none</param-value>
    </context-param>

 

For your information,

1.  I have already configured liferay-portlet.xml file with "<ajaxable>false</ajaxable>" property but still, were faced the same issue,

2. The plugin is created as below mvn archetype:generate,

   *> mvn archetype:generate -DarchetypeGroupId=com.liferay.faces.archetype -DarchetypeArtifactId=com.liferay.faces.archetype.primefaces.portlet  -DarchetypeVersion=5.0.3 -DgroupId=com.xxxx  -DartifactId=com.xxxx.bookmarks.portlet

 

  *> mvn archetype:generate -DarchetypeGroupId=com.liferay.faces.archetype -DarchetypeArtifactId=com.liferay.faces.archetype.primefaces.portlet  -DarchetypeVersion=5.0.3 -DgroupId=com.xxxx  -DartifactId=com.xxxx.RecycleBinportlet.portlet

 

Anyway once again thank you very much for your help/suggestions. 

 

Thanks & Regards,

Sachin Jagtap

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Sachin,
I could not reproduce your error. It seems like your custom theme conflicts with PrimeFaces. Are you content with the solution of disabling the PrimeFaces theme? If not, you can supply the simplest version of the theme that reproduces this error, and I can try to reproduce the problem and fix. Otherwise, thanks for letting everyone know how you fixed the issue.

- Kyle

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Is your portlet &lt;ajaxable&gt;true&lt;/ajaxable&gt;? If it is, please try changing it to &lt;ajaxable&gt;false&lt;/ajaxable&gt; and see if that fixes your issue.