Problem was they did not have same scope.
Liferay: Can't select by Category in Asset Publisher
-
15-07-2023 - |
Question
Im adding Documents with this snippet of code:
fileEntry = DLAppServiceUtil.addFileEntry(
repositoryId, folderId, filename, MimeTypesUtil.getContentType(strFile), filename,
description, changelog, in, srcfile.length(), serviceContext);
Documents are shown in Asset Publisher and Documents and Media Portlet. After this im adding Vocabularies and Categories programatically, which are shown correctly in Categories Navigation Portlet. Then i'm adding the Categories to the documents. This Categories are shown in Asset Publisher correctly, but when i select a Category in Category Navigation Portlet i don't get any result. In Documents and Media Portlet selection by Category is working without problems.
This is the code i'm using to attach Categories:
DLAppHelperLocalServiceUtil.updateAsset(userId, fileEntry, fileEntry.getLatestFileVersion(), categoryIds, null, null);
I would be very glad anybody got a hint.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow