Issue
Search result redirects to wrong page when there are multiple pages with Document and Media Portlet configured for showing individual folders.
-
Steps to reproduce:
1. Create three folders in Document and Media and add some files to each of them.
2. Create three pages on the site.
3. Add Document and Media portlet to all three pages and configure one-one folder as root folder on each page.
4. Search the file on site.
5. Click on the file name in the search.
Observed Behavior: The file opens on a different page than the one it is added on.
Expected Behavior: The file opens on the same page as it is added on.
Environment
- Liferay DXP 7.3
Resolution
- Above Observed behavior is the expected behavior of Liferay portal.
- Although Liferay portal has the possibility to Display Selected Results in Context, it doesn't guarantee the content (document) is displayed where user puts it originally.
Additional Information
- Excerpt from Configuring the search result widget :
Display Selected Result in Context: Show clicked assets in their native display widgets, if one is detected on a page in the same Site. For example, if you click on a blog post in the search results, you see the Blogs Entry in the Blogs application. You’re no longer in the search context after clicking on a search result.
When this option is unchecked or an asset is not displayed on a page in the Site, the asset instead displays in an Asset Publisher window while still in the search page context. If you have the right permissions, you can even edit the content directly from the Search context. Click the back arrow to return to the search results.