Gallery Macro is not able to sort by comments when there are combination of empty and non-empty comments

XMLWordPrintable

      Gallery Macro in 2.10.x is not able to sort by comments if the images uploaded have combination of comments and without comments.

      Steps to reproduce:
      1. Upload 2 images and specify comment to the attachments.
      2. Upload another few more images without comments to the attachments.
      3. Use the following macro:

      {gallery:title=Some office photos, and a waterfall|sort=comment}
      

      4. Upon saving/previewing the page, the following exception was thrown:

      Error formatting macro: gallery: java.lang.NullPointerException 
      

      Please note that this does not happen in the earlier version of Confluence

              Assignee:
              Unassigned
              Reporter:
              Henry Tiong [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: