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

BaseIndexer.getBaseModelDocument() indexes tag names, but not tag ids, when entity use resource blocks

    Details

      Description

      BaseIndexer.getBaseModelDocument() indexes tag names, but not tag ids, when entity use resource blocks. One of the many possible consequences is that asset publishers which filter by tags would not filter in/filter out an entity with a specific time.

      For now, it is know to affect the Bookmarks portlet and the new Calendar portlet but would affect any indexer of entities with related resource blocks.

      Steps to reproduce

      These steps reproduce the bug in the Bookmarks portlet

      1. Start up a brand new Liferay on an empty database.
      2. Log in. Add two Asset Publisher instances to the current page.
      3. Go to the configuration dialog of one of the AP instances.
      4. In the section "Filter", add a rule "[Contains] [Any] of the following [Tags]" with the tag "example".
      5. Click on "Save". Close dialog
      6. On the non-filtered asset publisher, click in "Add New"; click in "Bookmarks Entry".
      7. Enter the name "Liferay", the URL "http://liferay.com".
      8. Click in "Save"; close the dialog
      9. On the non-filtered asset publisher, click in "Add New"; click in "Bookmarks Entry".
      10. Enter the name "Wikipedia", the URL "http://en.wikipedia.org".
      11. In the section "Categorization", add the tag "example" to the "Wikipedia" link.
      12. Click in "Save"
      13. On the non-filtered asset publisher, click in "Add New"; click in "Blogs Entry".
      14. Enter any title and content. In the "Categorization" section, add the "example" tag.
      15. Observe the two asset publishers
      16. Open the Lucene directory with luke
      17. Execute the query "assetTagNames: example"
      18. Observe the columns assetTagNames and assetTagIds on the results

      Expected results

      • In step 15, the two bookmarks would be displayed in the unfiltered asset publisher, and only the tagged bookmark would appear in the filtered asset publisher.
      • In step 18, both assetTagNames and assetTagIds would be set for both the tagged blog entry and the tagged bookmark.

      Actual results

      • In step 15, the unfiltered asset publisher displays the two bookmarks but the filtered asset publisher displays no bookmark at all:
      • In step 18, both assetTagNames and assetTagIds are set to the blog entry, but only assetTagNames is set to the bookmarks entry - there is no assetTagIds to it:

        Attachments

        1. asset-publishers-bad-result.png
          asset-publishers-bad-result.png
          39 kB
        2. fixed1.jpg
          fixed1.jpg
          111 kB
        3. fixed2.jpg
          fixed2.jpg
          279 kB
        4. luke-bad-result.png
          luke-bad-result.png
          29 kB

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M1