Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.1.10 DXP FP23, 7.1.X, 7.2.10 DXP FP12, 7.2.X, 7.3.10 DXP FP1, 7.3.X, Master
-
7.3.x, 7.2.x, 7.1.x
-
Committed
-
3
-
Regression Bug
-
Community
Description
Related to https://issues.liferay.com/browse/LPS-123694
Steps to reproduce
- create custom document or custom webcontent structure
- create custom field
- set 'Localizable' to No
- create document entry or custom web content based on structure
- check fieldname in Elasticsearch, e.g.:
curl "localhost:9201/_search?q=entryClassName:com.liferay.document.library.kernel.model.DLFileEntry&pretty=true"
(note: replace localhost:9201 with the correct machine and port, where elasticsearch server is located)
- field name is located in nested ddmFieldArray => ddmFieldName
- create a page with searchbar, searchresult
- search for newly created item
- now add custom facet widget and configure aggregation field (from step 6)
- Expected behavior: The custom facet widget works correctly and displays correct facet data
- Wrong behavior: Once you have saved it, the page will already show a broken widget if not try to search for the newly created item
java.lang.ArrayIndexOutOfBoundsException: 1 at com.liferay.portal.search.web.internal.custom.facet.portlet.shared.search.CustomFacetPortletSharedSearchContributor.contributeWithNestedFacet(CustomFacetPortletSharedSearchContributor.java:115) at com.liferay.portal.search.web.internal.custom.facet.portlet.shared.search.CustomFacetPortletSharedSearchContributor.contribute(CustomFacetPortletSharedSearchContributor.java:72) at com.liferay.portal.search.web.internal.portlet.shared.search.PortletSharedSearchRequestImpl.lambda$getSearchSettingsContributor$3(PortletSharedSearchRequestImpl.java:203) at com.liferay.portal.search.web.internal.search.request.SearchRequestImpl.lambda$buildSettings$2(SearchRequestImpl.java:132) at java.lang.Iterable.forEach(Iterable.java:75) at com.liferay.portal.search.web.internal.search.request.SearchRequestImpl.buildSettings(SearchRequestImpl.java:131) at com.liferay.portal.search.web.internal.search.request.SearchRequestImpl.search(SearchRequestImpl.java:63) at com.liferay.portal.search.web.internal.portlet.shared.search.PortletSharedSearchRequestImpl.doSearch(PortletSharedSearchRequestImpl.java:174) at com.liferay.portal.search.web.internal.portlet.shared.search.PortletSharedSearchRequestImpl.lambda$search$0(PortletSharedSearchRequestImpl.java:76) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.liferay.portal.search.web.internal.portlet.shared.task.PortletSharedTaskExecutorImpl.executeOnlyOnce(PortletSharedTaskExecutorImpl.java:67) at com.liferay.portal.search.web.internal.portlet.shared.search.PortletSharedSearchRequestImpl.search(PortletSharedSearchRequestImpl.java:75) at com.liferay.portal.search.web.internal.custom.filter.portlet.CustomFilterPortlet.render(CustomFilterPortlet.java:76) at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:127) at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:58) at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:124) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
- Expected behavior: The custom facet widget works correctly and displays correct facet data
As a work-around I have set the field to Localizable: Yes but took me some time to figure what was wrong.
Attachments
Issue Links
- is caused by
-
LPS-123694 Custom facet no longer works with DDM fields on Elasticsearch
- Closed
- Testing discovered
-
LPS-136645 ArrayIndexOutOfBoundsException in headless api if you sort using a non-localizable DDM field
- Closed