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

Web Content urlTitles containing Slash characters (in Asset Publisher) shall work without parameters as a FriendlyURL

    Details

      Description

      I am submitting this feature request on behalf of our partners Nicolas Grue and Quang-Tu Le.


      Steps to reproduce:

      1. Create a web content, put "title / with slash" in it's title
      2. Check the DB for this web content's urlTitle
      3. Create a page, place an Asset Publisher on it
      4. Check the link of the "title / with slash" web content

       

      Current behavior:

      The URL contains additional assetEntryId parameters after the friendlyURL part (after the '?' character).

      For example an URL like:

      http://localhost:8080/web/guest/ujra/-/asset_publisher/BRHfsRH19Ak4/content/vie-pro-perso-en-travaillant-c3-a0-distance?_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4_assetEntryId=131425&_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4_redirect=http%3A%2F%2Flocalhost%3A8080%2Fweb%2Fguest%2Fujra%3Fp_p_id%3Dcom_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4_cur%3D0%26p_r_p_resetCur%3Dfalse%26_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4_assetEntryId%3D131425

      And the connecting assetEntryId parameter is:

      _com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_BRHfsRH19Ak4_assetEntryId=131425

       

      Expectation (quoted from the partner's message):

      Make sure urlTitle field is used in final URLs with no alteration (and with no need for an extra parameter). 
      This could be achieved by different ways. We can find 2 of them, but better options may be possible (considering support of slashes is still not the intended behaviour):

      Option 1: clean data 

      • replace or remove slashes in urlTitle before persistence in db 
      • legacy data : an upgrade process that would batch-update existing urlTitle containing a slash, the same way. 
      • legacy urls support: make sure that the extra parameter introduced by LPS-105044 still works (content is displayed when that parameter is present), wether urlTitle before it contains slashes or not (we believe it is the current behaviour, but it would be safer to check).

      Option 2: support both behaviours by configuration 

      • behaviour A: replace or remove slashes in urlTitle (like option 1) 
      • behaviour B: deal with slashes as LPS-105044 does. 
      • a config option or property allows to choose between A or B

      We think option 1 is more elegant/powerful, but option 2 would do the job.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              jozsef.geczi Jozsef Geczi
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package