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

Canonical URLs include query parameters and negatively impact SEO performance as a result

    Details

      Description

      DESCRIPTION
      Customer is complaining of incorrect canonical URLs that have URL parameters included and are different for the same page with different content. This effectively negates the purpose of the Canonical URL. An example of a canonical URL Liferay is generating after clicking a pagination "Next" link on an asset publisher page is:

      <link data-senna-track="temporary" href="https://www.website.co.uk/stories.aspx?p_p_id=com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_zuZa43h5A5sc&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_zuZa43h5A5sc_delta=21&p_r_p_resetCur=false&_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_zuZa43h5A5sc_cur=2" rel="canonical" />

      See https://issues.liferay.com/browse/PTR-365 for additional details and a discussion of this topic.

      STEPS TO REPRODUCE
      1. Add asset publisher to a page
      2. Add any 3 assets to the asset publisher
      3. Configure asset publisher to display one item at a time and use regular pagination
      4. Sign out
      5. Navigate to the newly created page and review the page source
      EXPECTED RESULTS
      URL in page source should be small, like:
      <link data-senna-track="temporary" href="http://master.lrsupport.com/test" rel="canonical" />
      ACTUAL RESULTS
      URL in page source instead shows something like
      <link data-senna-track="temporary" href="http://master.lrsupport.com/test?p_p_id=com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_KPNB4kvah4g2&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_KPNB4kvah4g2_delta=1&p_r_p_resetCur=false&_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_KPNB4kvah4g2_cur=2" rel="canonical" />
      BRANCH
      Reproduced
      private-016b57580c59890f0068af3ae0feb679f51e3f61
      MASTER
      Reproduced
      78f4982e183d3ea9992c53f7979a582639885507

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP55
                  7.0.0 DXP SP9
                  7.0.X
                  7.1.10 DXP FP1
                  7.1.1 CE GA2
                  7.1.10.1 SP1
                  7.1.X
                  Master