Legacy Knowledge Base
Published Jun. 30, 2025

"Link to Page of this site" "Select" popup is slow when the site has lot of pages.

Written By

Adam Kollar

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

Issue

  • When a site contains a large number of pages when creating a "Link to Page of this site" page then clicking on "Select" the Popup window's load time is long.
  • To reproduce:
    • On a site with a very large number of pages(14000 pages during our test)
    • Go to Site Builder --> Pages --> and create a "Link to Page of this site" page.

    • Click the "Select" button on the created Page.

    • Observe the popup.

  • Actual Result: It takes a long time to display the pages (for me it took around 10 seconds).
  • Expected Result: The popup should display the pages right away.

Environment

  • DXP 7.3+

Resolution

  • This is an unintended behavior and has been reported and addressed in the following tickets:
  • Please Open a help center ticket to request a hotfix containing the above mentioned LPS tickets.

Additional Information

  • In case you would like to test this behavior in a vanilla instance you can use the following script to generate the pages:
    • Run the following script to generate around 14000 pages by navigating to System --> Server Administration --> Script:

    • import com.liferay.petra.string.StringPool;
      import com.liferay.portal.kernel.log.Log;
      import com.liferay.portal.kernel.log.LogFactoryUtil;
      import com.liferay.portal.kernel.model.Group;
      import com.liferay.portal.kernel.model.Layout;
      import com.liferay.portal.kernel.model.LayoutConstants;
      import com.liferay.portal.kernel.service.GroupLocalServiceUtil;
      import com.liferay.portal.kernel.service.LayoutLocalServiceUtil;
      import com.liferay.portal.kernel.service.ServiceContext;
      import com.liferay.portal.kernel.service.ServiceContextThreadLocal;
      
      public class LayoutGenerator {
      	
      	def chars = ['a','b','c','d','e','f','g','h','i','j','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] as char[];
      	
      	public void execute() {
      		try {
      			ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext();
      			
      			Group group = GroupLocalServiceUtil.fetchFriendlyURLGroup(serviceContext.getCompanyId(), "/myportal");
      			if ( group!=null ) {
      				generateLayouts("pagin", 0, 4, 11 , group, serviceContext);
      			}
      			else {
      				log.info("NO GROUP FOUND");
      			}
      		} catch (Throwable e) {
      			log.error(e.getMessage(), e);
      		} finally {
      		}
      	}
      
      	public void generateLayouts(String name, long parentLayoutId, int level, int count, Group group, ServiceContext serviceContext) {
      		try {
      			if ( level<= 0) {
      				return;
      			}
      			
      			if ( count > chars.length ) {
      				count = chars.length;
      			}
      			
      			long userId = serviceContext.getUserId();
      			long groupId = group.getGroupId();
      			boolean isPrivateLayout = false;
      			String title = "";
      			String description = "";
      			String type = LayoutConstants.TYPE_PORTLET;
      			boolean isHidden = false;
      			String friendlyURL =  StringPool.BLANK;
      
      			for (int i = 0; i < count; i++) {
      				try {
      					String realName = name.concat(String.valueOf(chars[i]));
      					Layout layout = LayoutLocalServiceUtil.addLayout(
      							userId, groupId, isPrivateLayout,
      							parentLayoutId, realName, title, description,
      							type, isHidden, friendlyURL,
      							serviceContext); 
      					log.info(realName);
      					generateLayouts(realName, layout.getLayoutId(),(level-1), count, group, serviceContext);
      				} catch (Exception e) {
      					throw e;
      				}
      			}
      
      		} catch (Throwable e) {
      			log.error(e.getMessage(), e);
      		} finally {
      
      		}
      	}
      	Log log = LogFactoryUtil.getLog("LayoutGenerator");
      }
      (new LayoutGenerator()).execute();
Did this article resolve your issue ?

Legacy Knowledge Base