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

Asset Publisher should not filter AssetRendererFactories based on whether an indexer is also available

    Details

      Description

      In training, we have to teach various concepts step by step. When upgrading our Advanced Developer training course to 6.1, we were having trouble with the AssetRenderer / AssetRendererFactory exercise, because Asset Publisher would never recognize our assets.

      It turns out that because of LPS-23322 (git commit bb6a2c389342ffa745ae131ec036b6ef18b4f373), our AssetRenderer was getting filtered out by the following code in init.jsp of Asset Publisher:

      if (!assetRendererFactory.isSelectable() || (indexer == null))

      { availableClassNameIds = ArrayUtil.remove(availableClassNameIds, classNameId); }

      Since we haven't reached the exercise on the indexer yet (it appears later in the course), Asset Publisher would never recognize our asset. My recommendation is to remove the || (indexer == null) from the if statement above. I've tested this locally, and our exercise works again. I don't see why there should be a dependency between asset renderers and indexers anyway.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 16 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2