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

Random Namespace is not random for multiple portlets

    Details

      Description

      PortalUtil.generateRandomKey(request, "portlet_asset_publisher_edit_query_rule") + StringPool.UNDERLINE

      will always return the same initial value for multiple portlets on a page.

      1. Log into Portal as an Admin
      2. Create a new page
      3. add 2 "asset publisher" portlets
      4. click "Add New > Blog Entry"
      5. publish a new blog entry with title "my title"
      6. in both portlets, click "my title"
      7. inspect the social bookmarks container looking for the id in both*
      • Or run the following script...
      AUI().use('aui-base', function(A) {
          
          console.log(A.all('#ykmt_socialBookmarks').size()); // tell me how many elements have the the same identifier
      });
      

      The script should return at most 1 for any unique idetifier, but in my case "ykmt_" is the generated randomNamespace that is generated once for each asset publisher portlet on the page and this causes conflicts as these are supposed to be unique identifiers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                linda.sui Linda Sui
                Reporter:
                marc.lundgren Marc Lundgren (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 46 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.0 CE RC6