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

Canonical URLs for direct Web Content links are incomplete

    Details

      Description

      Reproduction steps:

      1) Use latest Master and start the server, login as an Admin
      2) Create a new page e.g. /page2 in default site and place an Asset Publisher on it

      3) Configure the Asset Publisher:

      • Asset Selection: Dynamic
      • Display Settings > Asset Link Behavior > View in Context
      • Display Settings > Asset Link Behavior > Set as the Default Asset Publisher for This Page: Yes

      4) Create a new Web Content with title "My content" and set its Display Page to be /page2
      5) Navigate to /page2 and click on the web content: the URL will turn to be: http://localhost:8080/web/guest/-/my-content?redirect=%2Fweb%2Fguest%2Fpage2

      6) Logout from DXP, open a new blank page in the browser
      7) Paste this URL into the address bar: http://localhost:8080/web/guest/-/my-content?redirect=%2Fweb%2Fguest%2Fpage2
      8) Inspect the page source in the <head> section:

      Actual behavior:

      <link data-senna-track="temporary" href="http://localhost:8080" rel="canonical">

      will appear

      Expected behavior:
      The attribute rel="canonical not to be included, or, alternatively, to be there, but the full <link> element to be:

      <link data-senna-track="temporary" href="http://localhost:8080/web/guest/-/my-content" rel="canonical">

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  42 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP70
                  7.0.X
                  7.1.10 DXP FP7
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master