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

Asset Publisher portlet filtering by custom fields displays all items if User's custom field is blank

    Details

      Description

      ISSUE
      Although you are setting Asset Publisher to only display items that match certain custom user profile attributes, all assets still display for Users that have left the custom user field blank.
      STEPS TO REPRODUCE
      (1) Create Custom attribute for User (e.g. Location)
      (2) Make sure to set permissions so that users can view the attribute
      (3) Create Vocabulary ("Location") in the global scope.
      (4) Add categories to vocabulary (e.g. "Chicago")
      (5) Set "Chicago" to location user attribute for User 1. Do not set a location for User 2.
      (6) Create and Categorize content with "Chicago" from location vocabulary.
      (7) Add asset publisher and specify "Location" as the user profile attribute to personalize upon
      (8) Sign in as User 1, he will see the article categorized as Chicago.
      (9) Sign in as User 2, he will also see the article

      Note: Workaround for QA: This issue is affected by LPS-43872, to avoid this issue we need to add a web content using the asset publisher.

      Note: When Test Test searches for the location 'Chicago', the AP portlet crashes and the following stacktrace is thrown:

      14:58:35,329 ERROR [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'][IncludeTag:129] Current URL /web/guest/wc-page?p_auth=hl0dS1Dk&p_p_id=86&p_p_lifecycle=1&p_p_state=pop_up&p_p_mode=view&_86_struts_action=%2Fportlet_configuration%2Fedit_configuration&_86_returnToFullPageURL=%2Fweb%2Fguest%2Fwc-page&_86_portletResource=101_INSTANCE_uXOt5mimCgSA&_86_previewWidth= generates exception: java.lang.RuntimeException: java.lang.NullPointerException
      java.lang.NullPointerException
              at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains(ExpandoColumnPermissionImpl.java:71)
              at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil.contains(ExpandoColumnPermissionUtil.java:59)
              at com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.getData(ExpandoValueServiceImpl.java:122)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(ExpandoValueServiceUtil.java:107)
              at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:208)
              at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:199)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.addUserAttributes(AssetPublisherImpl.java:270)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.addUserAttributes(AssetPublisherUtil.java:82)
              at com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor.processAssetEntryQuery(CustomUserAttributesAssetEntryQueryProcessor.java:40)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.processAssetEntryQuery(AssetPublisherImpl.java:1102)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.processAssetEntryQuery(AssetPublisherUtil.java:266)
      14:58:35,735 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][IncludeTag:129] Current URL /web/guest/wc-page generates exception: java.lang.RuntimeException: java.lang.NullPointerException
      java.lang.NullPointerException
              at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains(ExpandoColumnPermissionImpl.java:71)
              at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil.contains(ExpandoColumnPermissionUtil.java:59)
              at com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.getData(ExpandoValueServiceImpl.java:122)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(ExpandoValueServiceUtil.java:107)
              at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:208)
              at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:199)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.addUserAttributes(AssetPublisherImpl.java:270)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.addUserAttributes(AssetPublisherUtil.java:82)
              at com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor.processAssetEntryQuery(CustomUserAttributesAssetEntryQueryProcessor.java:40)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.processAssetEntryQuery(AssetPublisherImpl.java:1102)
              at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.processAssetEntryQuery(AssetPublisherUtil.java:266)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hong.zhao Hong Zhao (Inactive)
              Reporter:
              marco.abamonga Marco Abamonga
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 26 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1