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

Invalid alternate link tags for alternate languages

    Details

      Description

      The canonical and default links are correct, but all the alternate links are not - they all lead to the home page. The alternate pages should point to the translated versions of the content.

      Steps to Reproduce:
      1. Install a fresh bundle of Liferay 6.2 EE SP6. Do not install sample contents.
      2. In the default site's display settings, have "English", "French" and "Spanish" as current languages. Move all others to "Available".
      3. In the default site, create a new basic Web content with the following information:

      • Title : "Content English"
      • Content : "Content English"

      4. Add two translations for that content. Do not create a new Web content - translate the one created in step 3. The translations will be french and spanish, with the following information:

      • Title : "Content {language}" where {language}

        is either "French" or "Spanish"

      • Content : "Content {language}" where {language}

        is either "French" or "Spanish"

      5. In the Web site's main public page, add an asset publisher
      6. Access the asset publisher's configuration
      7. In the Display Settings section:

      • Set "Asset link behaviour" to "View in context"
      • Check "Show available locales"
      • Check "Set as the Default Asset Publisher for This Page"

      8. Save the settings
      9. Log out (otherwise the "link" tags won't be displayed in the "head" section of the HTML source)
      10. Click on the "Content English" article
      11. Look at the HTML source, you will see in the HEAD section that:

      • The canonical and default "link" tags point to the current Web content
      • The alternate "link" tags point the home page

      Expected Behavior: alternate links point to the translated versions of the content
      Actual Behavior: alternate links point to the home page

      NOTE: The links are correct when you're on the home page and have not yet selected content. Once you select the content within the asset publisher, the alternate links should then be links to alternate translations of that content, not still pointing to the home page.

      Testing:
      Reproduced in 6.2.x - e9de90d6d8a1c3b3bff873ed822d2c1a3fe68de4
      Reproduced in master - 92b7f2557c4fee6afb7635fbc4115b30b431b452

        Attachments

        1. Broken.png
          Broken.png
          158 kB
        2. withLPS-55335.png
          withLPS-55335.png
          146 kB

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              steven.smith Steven Smith (Inactive)
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 16 weeks ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M6