Issue
- When an invalid ID is passed as the value of the category field in the URL, all the widget shows the error "Portlet is temporarily unavailable".
- As a result, all the widgets should show the message "No Results available".
Steps to reproduce:
- Start the clean instance of Liferay DXP 7.4 (tested with update 90)
- Create a widget page and add widgets like “search bar, search options, specification facet, search results, option facet, and category facet”.
- From the left side panel, navigate to categorization->categories->create a vocabulary and add categories to it. Simultaneously, click on the category and copy the ID of the category from the URL.
- Navigate to system settings->search->category facet field->select assetVocabularyCategoryIds from the dropdown and save.
- Go to the configuration option of the category facet widget using the action button, select vocabularies->Liferay DXP->name of the vocabulary, and click save.
- Navigate to the widget page that is created in step 2 and in the URL, enter http://localhost:8080/widget_page_name?category=ID where widget_page_name is the name of the page created and ID should be the category ID that is copied as mentioned in step 3. Finally hit Enter.
- The above step gives the category name displayed in the category facet.
- Finally, in the same URL i.e. http://localhost:8080/widget_page_name?category=ID, enter any invalid ID like 123, abcd, etc, and hit enter. The result that is displayed is "Portlet is temporarily unavailable".
Actual Results: All the widgets are unavailable and showing a message "Portlet is temporarily unavailable".
Expected Results: All the widgets should show some message like "No Results available".
- Here is the attached video showcasing the behavior of widgets.
Environment
- Liferay DXP 7.4 update 90 and above
- Liferay DXP 2023.Q1 and above
Resolution
- The message "No results available" or an "Empty result message" is only expected to be displayed from the Product perspective when there are really no results matching the user's keywords and valid facet selections.
- All the facets including the Site and Type facets (with the exception of the Category Facet, of course) behave consistently the same way: the facets are rendered, available other “real” facet terms are also shown (depending on the rest of the selections in other facets), the CLEAR button also appears, but the invalid facet term is not selected in the list when the request was submitted with invalid values. And the clear action effectively removes the invalid selections from the URLs. Invalid category IDs should be ignored and the Category Facet should still be rendered.
- Depending on the user’s keywords and the active selection in other facets, this may yield or not yield results.
- However, this behavior has been addressed via LPD-33329 wherein whenever the invalid IDs are passed in the URL, the category facet always displays the "CLEAR" button.
Additional Information
- Please submit a support ticket if you require more information from the product aspect by attaching patch details.
- Installing Fix Packs and Hotfixes on Liferay DXP will guide installing the hotfix in the respective environment.