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

Discussion taglib lacks namespace disparity when multiple instances in a single portlet



      There are two issues caused by improper namespacing.

      1. When a comment is added to any discussion instance besides the first one in a portlet the wrong random namespace is added to the hash used to scroll to that comment. This is because the selector used to get the random namespace value uses the portlet namespace so all instances of the discussion will get the value of the random namespace for the first instance of the discussion in the portlet.
      2. The success and error messages are added to the first instance of the discussion in the portlet instead of the instance the message originated from. This is also because the portlet namespace is used to grab the node instead of a unique random namespace.

      Master Git SHA: 892d5704fccff3eb2088daa50ba0b9f724f2e855

      Reproduction Steps

      1. Start Portal.
      2. Add Asset Publisher Portlet to the page.
      3. Add a few other portlets above the Asset Publisher so that you have to scroll down to see it (Calendar portlet is what I used).
      4. Go to Configuration > Display Settings and choose Rich Summary display template and select the Enable Comments checkbox and save.
      5. Add at least two blog entries to the Asset Publisher (Add New > Blogs Entry).
      6. Add a comment to the first entry. Note that the page scrolls to the comment after it has been posted. Note also that a success message is shown above the discussion.
      7. Add a comment to the second entry. Note that the page does not scroll to the comment after it has been posted and that the hash added to the url does not exist anywhere on the page. Note also that the success message is added to the first discussion instead of the second one.


        1. Fixed62.PNG
          61 kB
        2. FixedM.PNG
          40 kB
        3. Reproduced.PNG
          54 kB

          Issue Links



              harry.chai Harry Chai
              weston.hancock Weston Hancock (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                5 years, 20 weeks, 6 days ago


                  Version Package
                  7.0.0 Beta 1