Legacy Knowledge Base
Published Sep. 10, 2025

In the Documents and Media portlet, the search is not performed on the selected folder in its configuration

Written By

Ahmed Abdin

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I have an issue with the documents and media portlet document search. I have two document folders and two document and media portlets on a page. One folder is set at a document folder, the other is set at another folder. When I search for a certain document set in a certain folder, the search result displays correctly. However, when performing the search on the other folder where the document is not, the search results still display the document.

Reproduction Steps:

  1. logged in with the admin user in the portal using DXP 7.4 update 92

  2. Access to Control Panel → Document & Media and create folder:'folderA' and upload an image:'imageA.png'

  3. Add the DL portlet to a page

  4. Configure widget:

    1. Root folder by default in configuration → Select folder ‘Provided by Liferay’

    2. Check in Show Action.

    3. Save the widget configuration.

  5. Search for example 'png' in search,

Expected Result: The images of the folder selected 'Provided by Liferay' should be displayed, not images from other folders as folderA

 Actual Result: Only image A is displayed as a search result, with the following error in the log:

ERROR [http-nio-8080-exec-7][IncludeTag:119] Current URL /documento?_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_keywords=png&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_navigation=home&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_searchRepositoryId=20117&p_p_mode=view&p_p_state=normal&p_p_id=com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB&p_p_lifecycle=0&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_mvcRenderCommandName=%2Fdocument_library%2Fsearch&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_keywords=&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_repositoryId=20117&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_searchFolderId=31601&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_folderId=0&_com_liferay_document_library_web_portlet_DLPortlet_INSTANCE_ZwpTPmjdEQQB_showSearchInfo=true generates exception: com.liferay.document.library.kernel.exception.NoSuchFolderException: No Folder exists with the key {folderId=0}
com.liferay.portal.kernel.repository.InvalidRepositoryIdException: No repository associated with folder 0
        at com.liferay.portal.repository.internal.RepositoryProviderImpl.getFolderRepositoryId(RepositoryProviderImpl.java:508) ~[?:?]
        at com.liferay.portal.repository.internal.RepositoryProviderImpl.getFolderRepository(RepositoryProviderImpl.java:205) ~[?:?]
        at com.liferay.portal.kernel.repository.RepositoryProviderUtil.getFolderRepository(RepositoryProviderUtil.java:90) ~[portal-kernel.jar:?]
        at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.getFolder(DLAppServiceImpl.java:1462) ~[portal-impl.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.document.library.kernel.service.DLAppServiceWrapper.getFolder(DLAppServiceWrapper.java:1099) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.document.library.kernel.service.DLAppServiceWrapper.getFolder(DLAppServiceWrapper.java:1099) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.document.library.kernel.service.DLAppServiceWrapper.getFolder(DLAppServiceWrapper.java:1099) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.document.library.kernel.service.DLAppServiceWrapper.getFolder(DLAppServiceWrapper.java:1099) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.document.library.kernel.service.DLAppServiceWrapper.getFolder(DLAppServiceWrapper.java:1099) ~[portal-kernel.jar:?]
        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:60) ~[portal-kernel.jar:?]
        at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:41) ~[portal-impl.jar:?]
        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:60) ~[portal-impl.jar:?]
        at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:48) ~[portal-impl.jar:?]
        at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) ~[portal-kernel.jar:?]
        at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:48) ~[portal-impl.jar:?]

Environment

  • Liferay DXP 7.4 update 92

Resolution

  • The case has been addressed and resolved by LPS-204483. Kindly upgrade to 2024.q1.1 or request a hotfix.
Did this article resolve your issue ?

Legacy Knowledge Base