PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-20730

Liferay allPortletsReady event does not fire if page contains Related Assets portlet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Inactive
    • Affects Version/s: 6.1.0 CE RC1
    • Fix Version/s: 7.0.0 M5
    • Component/s: UI Infrastructure
    • Labels:
      None
    • Environment:
      Latest Nightly Build 01/09/2011
    • Epic/Theme:
    • Story Points:
      3
    • Fix Priority:
      3
    • Similar Issues:
      Show 5 results 

      Description

      1. Modify/Update a theme so the main.js file contains the following script:

      Liferay.on(
      'allPortletsReady',
      /*
      This function gets loaded when everything, including the portlets, is on
      the page.
      */

      function()

      { alert("All Portlets Ready event fired"); }

      );

      2. Apply the theme with the modified main.js to the home page.

      3. As a GUEST user navigate to the home page and confirm that the alert fires.

      4. Login an add the "Related Assets" portlet to the page.

      5. Log out and as the GUEST user again navigate to the home page. Confirm the alert does NOT fire.

      The addition on the "Related Assets" portlet to the page prevents the "All Portlets" ready event from triggering correctly.

        Activity

        Hide
        Ryan Wan added a comment -

        Hi Richard,

        Thank you for reporting this issue. I have tested this issue in HEAD revision of trunk, but I cannot reproduce the issue you have described.
        I have add several portlets to the page to make it long enough to scroll, then I added Related Assets portlet.
        Then add ?scroll=hrefFm to the URL, the page did navigate to the bottom of the page which indicates allPortletsReady event has already been triggered. (See LPS-15962)
        I'm going to resolve this ticket since it's no more reproduced, if you still have concern about this issue, pleas update this ticket.

        Thanks,
        Ryan Wan.

        Show
        Ryan Wan added a comment - Hi Richard, Thank you for reporting this issue. I have tested this issue in HEAD revision of trunk, but I cannot reproduce the issue you have described. I have add several portlets to the page to make it long enough to scroll, then I added Related Assets portlet. Then add ?scroll=hrefFm to the URL, the page did navigate to the bottom of the page which indicates allPortletsReady event has already been triggered. (See LPS-15962 ) I'm going to resolve this ticket since it's no more reproduced, if you still have concern about this issue, pleas update this ticket. Thanks, Ryan Wan.
        Hide
        Richard Gibson added a comment -

        I can still reproduce this problem using the URL

        https://localhost:8443/web/guest/home?scroll=hrefFm
        or
        http://localhost:8080/web/guest/home?scroll=hrefFm

        It's really important that you are NOT logged in to reproduce this issue. It only seems to trigger if you are the Guest user.

        Can you confirm you weren't logged in when you attempted to reproduce the problem?

        Show
        Richard Gibson added a comment - I can still reproduce this problem using the URL https://localhost:8443/web/guest/home?scroll=hrefFm or http://localhost:8080/web/guest/home?scroll=hrefFm It's really important that you are NOT logged in to reproduce this issue. It only seems to trigger if you are the Guest user. Can you confirm you weren't logged in when you attempted to reproduce the problem?
        Hide
        Richard Gibson added a comment -

        Hi,

        I have investigated this further, I can confirm there is a problem.

        This issue occurs when you have a portlet that is not included on the page for some reason. For example,

        Adding an instance of the web-content-display portlet to a page but NOT configuring what web content to display will cause the 'allPortletsReady' event to NOT fire when the page is viewed by the guest user.

        This is because the missing portlet does not fire its 'portletReady' event, this is the trigger to fire the 'allPortletsReady' event once all portlets on the page have reported ready.

        The problem is in the portlet.js file line 454

        var portlet = A.one('#' + namespacedId);

        if (portlet && !portlet.portletProcessed)

        { //the portlet ready event fires in here }

        As the portlet is not present on the page for the Guest user, the A.one('#' + namespacedId) call returns null, so the portlet ready event does not fire for this instance.

        Can you re-open this issue please.

        Show
        Richard Gibson added a comment - Hi, I have investigated this further, I can confirm there is a problem. This issue occurs when you have a portlet that is not included on the page for some reason. For example, Adding an instance of the web-content-display portlet to a page but NOT configuring what web content to display will cause the 'allPortletsReady' event to NOT fire when the page is viewed by the guest user. This is because the missing portlet does not fire its 'portletReady' event, this is the trigger to fire the 'allPortletsReady' event once all portlets on the page have reported ready. The problem is in the portlet.js file line 454 var portlet = A.one('#' + namespacedId); if (portlet && !portlet.portletProcessed) { //the portlet ready event fires in here } As the portlet is not present on the page for the Guest user, the A.one('#' + namespacedId) call returns null, so the portlet ready event does not fire for this instance. Can you re-open this issue please.
        Hide
        Richard Gibson added a comment -

        I'm worried this issue is going to get lost, can it be reopened and reinvestigated given the updated information I have added to this issue?

        Show
        Richard Gibson added a comment - I'm worried this issue is going to get lost, can it be reopened and reinvestigated given the updated information I have added to this issue?
        Hide
        Vicki Tsang added a comment -

        Reopened as per reporters instructions. Please retest.

        Show
        Vicki Tsang added a comment - Reopened as per reporters instructions. Please retest.

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 34 weeks, 5 days ago

              Development

                Structure Helper Panel