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

Display Page Templates for custom Document Types cannot be displayed

    Details

      Description

      In 7.3, it is not possible to preview a document using a combination of a custom Document Type and Display Page Template. 

      Specifically the URL generated for that document in either an Asset Publisher or in Search results does not redirect to that Display Page Template.

      Expected Behaviour:

      The document displays a Friendly URL in Search Results or Asset Publisher which causes the Display Page Template to be used to render the full preview of the document and its fields.

      Observed Behaviour:

      Two different behaviours have been observed:

      1. If no DPT has been created for "Basic Document" a "generic" URL (i.e. not a Friendly URL) is generated and therefore the document previews in the context of where it was found (e.g. Search results portlet, Asset Publisher portlet)
      2. If a DPT has been created for "Basic Document" a friendly URL is generated, but the document is rendered in the DPT for "Basic Document", not it's own DPT

      Steps to Reproduce:

      1. Create a new Document Type, add one custom Field
      2. Create a Display Page Template mapped to this Document Type, add a Heading Fragment and edit the default text to "Custom Document Type".  Add a Paragraph Fragment and map to your custom field
      3. Mark this DPT as the Default for the Document Type
      4. Add a Document for your new Document Type, upload a file and ensure that a value is added for your custom field
      5. Search for this document, observe that the generated URL is not a friendly URL - e.g. 
       http://localhost:8080/en/web/guest/search?p_p_id=com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_mvcPath=%2Fview_content.jsp&_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_assetEntryId=43849&_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_type=document&p_l_back_url=%2Fen%2Fweb%2Fguest%2Fsearch%3Fq%3Dplayback

      (This represents the first observed behaviour as described above)

      1. Now, add a new DPT for Basic Document, add a Heading Fragment and edit the default text to "Basic Document", add a Paragraph Fragment and map to the Title.
      2. Publish the DPT and mark it as the Default
      3. Search for your Document again, this time the URL is the friendly one - e.g. 
       http://localhost:8080/en/web/guest/d/43843?p_l_back_url=%2Fen%2Fweb%2Fguest%2Fsearch%3Fq%3Dplayback
      1. Follow the link and observe that the DPT for Basic Document is used to display the document
        (This represents the second observed behaviour as described above) 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              beck.liu Beck Liu
              Reporter:
              beck.liu Beck Liu
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              Engineering Assignee:
              Jürgen Kappler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.3.10 DXP FP1
                  7.3.10.1 DXP SP1
                  7.3.6 CE GA7
                  7.3.X