Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-14993

User preferences do not get loaded into the frontend widget after refresh

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 6.0.5 GA
    • None
    • None
    • can simulate on all browsers

    Description

      When the gadget loads, the user preferences are successfully retrieved from the server.
      Then the gadget refreshes after updating the preferences object on the frontend.
      But it seems the refresh sometimes happens before updating the preferences in the widget object.
      I tried to debug it, it must be some kind of race condition problem but it all looked a bit rocked science to me.

      It's hard to simulate aswell. I had the most luck in chrome and opera.

      I found a workaround though to wait one second before refreshing the gadget:

      _syncPrefs: function(prefs) {
      var instance = this;

      instance.set(
      'userPrefs',
      prefs,

      { SYNC: true }

      );

      window.setTimeout( function ()

      { instance.refresh(); }

      , 1000);
      },

      Attachments

        Activity

          People

            support-lep@liferay.com SE Support
            kdejaeger Koen De Jaeger (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 45 weeks, 5 days ago

              Packages

                Version Package