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

Searched content pages are not returned in staging

    Details

    • Story Points:
      1
    • Fix Priority:
      4
    • What problem did the customer find?:
      Content pages cannot be searched in Staging site
    • What do you think is the root cause? (if known):
      Hide
      The root cause is due to LPS-124407 when the Layout Crawler was implemented.
      Show
      The root cause is due to LPS-124407 when the Layout Crawler was implemented.
    • Proposed solution (if any):
      Hide
      A suggested fix was to bring back the getStagedContent method in LayoutModelDocumentContributor.java. This fix works when the staged site gets initalized, but any page modifications after that will result in the page not being found. During my debugging process, I found that the LayoutCrawler will return a null content when adding or editing a page. I believe the cause is due to the layout crawler imitating navigation as a guest user. A guest user is not authorized to view staged content. I tried authorizing the httpClientContext before layout crawler retrieves the response but couldn't get that to work.
      Show
      A suggested fix was to bring back the getStagedContent method in LayoutModelDocumentContributor.java. This fix works when the staged site gets initalized, but any page modifications after that will result in the page not being found. During my debugging process, I found that the LayoutCrawler will return a null content when adding or editing a page. I believe the cause is due to the layout crawler imitating navigation as a guest user. A guest user is not authorized to view staged content. I tried authorizing the httpClientContext before layout crawler retrieves the response but couldn't get that to work.

      Description

      The issue here is caused by LPS-124407 when the Layout Crawler was implemented.

      Steps to reproduce:

      1. Start Liferay and login
      2. Create a new Web Content named: bus
        Add the word 'vehicle' to the content field > Press Publish.
      3. Create a Content Page named: New Content Page
      4. Add a Web Content Display widget to the page and configure it to display 'bus' > Press Publish
      5. Go to the Liferay DXP site
      6. Use the default search widget to look up 'vehicle'
        Expected/Actual Result: 2 hits are returned
      7. Enable Local Live Staging: Control Panel > Publishing > Staging > Local Live
        Configure the following options:

      [Staging Configuration]
      Local Live

      [Page Versioning]
      Enabled on Public Pages

      [Staged Content]
      Documents and Media, Forms, Knowledge Base, Mobile Device Families, Segments, Web Content, Widget Templates

      Press Save > OK.

              8. Navigate to Live Site
              Expected/Actual Result: search again for the term 'vehicle' > note 2 hits are returned

              9. Navigate to Liferay DXP - Staging Site and search again for the term 'vehicle' 

       Expected Result: 2 hits are returned

       Actual Result: 1 hit is returned

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              team-echo Product Team Echo
              Reporter:
              noor.najjar Noor Najjar
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Engineering Assignee:
              Noor Najjar
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                10 weeks, 5 days ago

                  Packages

                  Version Package