-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.2 CE GA3, 7.1.X, Master
-
Fix Version/s: 7.1.10 DXP FP19, 7.1.10.5 SP5, 7.1.X, 7.2.10 DXP FP7, 7.2.X, 7.3.3 CE GA4, 7.3.4 CE GA5, 7.3.10 DXP GA1, Master
-
Branch Version/s:7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
Regarding search engine limitations, there are these rules for sitemaps:
Any Sitemap file is limited to 50MB (uncompressed) with a maximum of 50,000 URLs.
But if you pass this number, no new sitemap file gets created.
With having 50002 web contents with certain display page
Steps to reproduce:
1) Run the following Groovy script:
def company = com.liferay.portal.kernel.util.PortalUtil.getCompany(actionRequest); long companyId = company.getCompanyId(); def user = com.liferay.portal.kernel.util.PortalUtil.getUser(actionRequest); long userId = user.getUserId(); def guestGroup = com.liferay.portal.kernel.service.GroupLocalServiceUtil.getGroup(companyId, com.liferay.portal.kernel.model.GroupConstants.GUEST); def groupId = guestGroup.getGroupId(); def type = com.liferay.portal.kernel.model.LayoutConstants.TYPE_PORTLET; def serviceContext = new com.liferay.portal.kernel.service.ServiceContext(); def pagePrefix = "my-layout-"; for (int i = 1; i <= 50001; i++) { def name = pagePrefix + i; def title = name; def description = name; def friendlyURL = "/" + name; com.liferay.portal.kernel.service.LayoutLocalServiceUtil.addLayout(userId, groupId, false, com.liferay.portal.kernel.model.LayoutConstants.DEFAULT_PARENT_LAYOUT_ID, name, title, description, type, false, false, friendlyURL, serviceContext); }
2) When finished, download the sitemap.xml file from http://localhost:8080/sitemap.xml
3) Executed the shell command:
grep -o '<loc>' sitemap.xml | wc -l
4) Check the value obtained by the command executed previously
Expected behavior:
- The value is 50000
Actual behavior:
- The value is 50002 (50001 pages created by the script plus the initial page already created at the time of the first installation)