Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.0 CE GA1
-
6.2.x
-
Committed
-
4
-
4
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
- Start up a brand new Liferay on an empty database.
- Log in. Add two Asset Publisher instances to the current page.
- Go to the configuration dialog of one of the AP instances.
- In the section "Filter", add a rule "[Contains] [Any] of the following [Tags]" with the tag "example".
- Click on "Save". Close dialog
- On the non-filtered asset publisher, click in "Add New"; click in "Bookmarks Entry".
- Enter the name "Liferay", the URL "http://liferay.com".
- Click in "Save"; close the dialog
- On the non-filtered asset publisher, click in "Add New"; click in "Bookmarks Entry".
- Enter the name "Wikipedia", the URL "http://en.wikipedia.org".
- In the section "Categorization", add the tag "example" to the "Wikipedia" link.
- Click in "Save"
- On the non-filtered asset publisher, click in "Add New"; click in "Blogs Entry".
- Enter any title and content. In the "Categorization" section, add the "example" tag.
- Observe the two asset publishers
- Open the Lucene directory with luke
- Execute the query "assetTagNames: example"
- 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: