Issue
- When I create a new page and name it by using a previously deleted page's name, I receive the following error like this one:
ERROR [ajp-nio-0.0.0.0-8009-exec-7][PortletServlet:119] javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: com.liferay.friendly.url.exception.DuplicateFriendlyURLEntryException: {mvccVersion=0, ctCollectionId=0, friendlyURLEntryLocalizationId=2538, companyId=58944, friendlyURLEntryId=59957, languageId=de_DE, urlTitle=/adressen, groupId=58982, classNameId=37280, classPK=547}
javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: com.liferay.friendly.url.exception.DuplicateFriendlyURLEntryException: {mvccVersion=0, ctCollectionId=0, friendlyURLEntryLocalizationId=2538, companyId=58944, friendlyURLEntryId=59957, languageId=de_DE, urlTitle=/adressen, groupId=58982, classNameId=37280, classPK=547}
Environment
- Liferay DXP 7.3
Resolution
- It is not possible to create a page and give it a name that is the same as a previously deleted page's name because the friendly URLs of the deleted page(s) are stored in the page-friendly URL history. This feature has been implemented by LPS-98176.
- Due to this feature, if we add two pages "Page1" & "Page2", and delete one of them "Page2", and rename Page1 with the name of the deleted page "Page2", we will receive the error because the friendly URL of the deleted page is still available and stored.
- Steps to Reproduce:
- Go to Control Panel --> Site Builder --> Pages and add two widget pages "page1" and "page2"
- Observe their friendly URLs showing /page1 and /page2
- Delete the page titled "page2"
- Go into the configuration of the page titled "page1", and rename it "page2", and change its friendly URL to /page2
- Go back to Site Builder --> Pages --> Click the + button, and add a new page called "page1"
Result: We will receive the error and the page cannot be created.
- In order to solve this issue, we should remove the old page-friendly URL from the page URL history after changing its name by performing the following:
-
- Go to Control Panel --> Site Builder --> Pages and find the modified page (page2).
- Click on the 3 dot menu beside it and select "Configure"
- Go to the friendly URL section and find the History icon and click it.
- A popup appears displaying the old friendly URL /page1.
- Go to the "x" and click it to delete it then save the configuration.