Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-125920

New FriendlyUrlEntry is added on page edit instead of updating previous

    Details

      Description

      Steps to reproduce:

      1. Start up the portal
      2. Create a page called "test"
      3. Edit the page. Rename it to "secondtest" and change its friendlyURL to "/secondtest"
      4. Try to create a new page called "test"

      Expected behaviour: The new page is created successfully, with a suffix attached to the new friendlyURL. In this case test-1. (see suggestion on the PR)

      Actual behaviour: Nothing is happening on the UI and you can see the DuplicateFriendlyURLEntryException in the logs. Additionally, http://localhost:8080/web/guest/test redirects to http://localhost:8080/web/guest/secondtest 

      Caused by: com.liferay.friendly.url.exception.DuplicateFriendlyURLEntryException: {mvccVersion=0, ctCollectionId=0, friendlyURLEntryLocalizationId=304, companyId=20099, friendlyURLEntryId=38658, languageId=en_US, urlTitle=/test, groupId=20123, classNameId=37701, classPK=22}
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.validate(FriendlyURLEntryLocalServiceImpl.java:519)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.validate(FriendlyURLEntryLocalServiceImpl.java:487)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.addFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:91)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.addFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:79)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy849.addFriendlyURLEntry(Unknown Source)
              at com.liferay.layout.internal.model.listener.LayoutFriendlyURLModelListener._addFriendlyURLEntry(LayoutFriendlyURLModelListener.java:58)
              ... 237 more

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            balazs.safrany-kovalik Balázs Sáfrány-Kovalik
            Participants of an Issue:
            Recent user:
            Laszlo Pap
            Engineering Assignee:
            Laszlo Pap
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              22 weeks, 2 days ago

                Packages

                Version Package