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

Asset Publisher can't filter by multiple categories



      When you add two or more categories and try to filter your assetpublisher portlet by both at the same time, you get an error and nothing is returned. The error is caused by a lost space in the SQL statement which causes a SQL error.

      When I reproduced it, I got

      01:31:58,215 ERROR [JDBCExceptionReporter:101] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AssetCategory.leftCategoryId BETWEEN 4 AND 5OR AssetCategory.leftCategoryId BETW' at line 1

      This was first brought up by a community member: http://www.liferay.com/community/forums/-/message_boards/message/5474019

      Steps to reproduce:

      - create at least two categories
      - post at least one news in each categories(ex: cat1 and cat2)
      - add an asset publisher
      - configure this asset publisher
      - choose filer: contains any of the following categories.
      - select both cat1 and cat2(in my case, select only cat1 still lead to error)
      - choose save
      - result: asset publisher doesn't display any news
      - error in log: could not execute sql query... and the error query contains "... BETWEEN xx AND xxOR ..."

      portal-impl/com/portlet/asset/service/persistence/AssetEntryFinderImpl.java is the guilty file according to the community member.




            • Assignee:
              jack.li Jack Li (Inactive)
              samuel.liu Sam Liu (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:
                Days since last comment:
                9 years, 36 weeks, 5 days ago


                Version Package
                6.0.5 GA