ICEfaces
  1. ICEfaces
  2. ICE-4136

JavaScript error with jQuery on Liferay 5.2.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.8RC1
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      portals portlets Liferay

      Description

      Firebug reports the following error when an ICEfaces portlet is loaded into a portal page under Liferay 5.2.1:

      Class is not a constructor
      http://localhost:8080/chat-portlet/javascript.js?browserId=firefox&minifierType=js&t=1234462600000
      Line 1

      The forum poster notes more information:

      "Some liferay portlets load javascript code delayed, which containts the following code "new Class({...})". This actually fails with "Class is not a constructor" error, if the icefaces javascript code is loaded before hand."

      The error only occurs when you are actually signed in as an registered user. Using the portlet as a "guest", it doesn't occur. The likely reason for the different behaviour is that when you are signed in, additional JavaScript is used to allow the registered user more features (add portlets to the page, drag them around). It appears that we may have a conflict occurring with this additional code.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Mircea,

        Please take a look at this and see if you can find out why this issue is occuring and if it has to do with our bridge code.

        Show
        Deryk Sinotte added a comment - Mircea, Please take a look at this and see if you can find out why this issue is occuring and if it has to do with our bridge code.
        Hide
        Mircea Toma added a comment -

        Looks like "barebone.js" file served by Liferay 5.2.1 includes a definition for a 'Class' named function. ICEfaces uses Prototype javascript library which also defines a 'Class' name variable. Whenever an ICefaces portlet is loaded, 'Class' named variable is re-written thus causing the mentioned error.

        Show
        Mircea Toma added a comment - Looks like "barebone.js" file served by Liferay 5.2.1 includes a definition for a 'Class' named function. ICEfaces uses Prototype javascript library which also defines a 'Class' name variable. Whenever an ICefaces portlet is loaded, 'Class' named variable is re-written thus causing the mentioned error.
        Hide
        Mircea Toma added a comment -

        Cannot fix this issue since 'Class' object is used extensively in Prototype library.

        Show
        Mircea Toma added a comment - Cannot fix this issue since 'Class' object is used extensively in Prototype library.
        Hide
        Deryk Sinotte added a comment -

        I opened a ticket on Liferay's system related to this issue:

        http://issues.liferay.com/browse/LPS-2250

        According to Liferay, this is fixed in their upcoming 5.3 code but will be difficult to backport unless we can come up with something creative.

        Show
        Deryk Sinotte added a comment - I opened a ticket on Liferay's system related to this issue: http://issues.liferay.com/browse/LPS-2250 According to Liferay, this is fixed in their upcoming 5.3 code but will be difficult to backport unless we can come up with something creative.

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: