-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.2 CE GA3 , 7.0.0 M4
-
Component/s: Categories
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:3
-
Fix Priority:3
-
Git Pull Request:
If I try to create an AssetCategory programatically using AssetCategoryLocalServiceUtil.addCategory( ... ); and forget to pass scopeGroupId via serviceContext, there is corrupted category created and no error is thrown.
The category is displayed properly in category tree under Categories section in Site's Control Panel but is not searchable using AssetCategoryLocalServiceUtil.search( ... ), not displayed with asset-categories-navigation taglib and generally unuseable in any other portal components.
It is not a big issue but I think the API should not allow to leave the data in inconsistent state. I spent some time figuring out what's wrong with my code and I'm sure there are lots of other people who will find this bug in the future