Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-363

richTextLinkReferenceResolver doesn't resolve localised link for all languages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.2.17
    • 2.2.12
    • None
    • None

      When passing parameter lang=all in a request to a endpoint with a richTextLinkReferenceResolver, links are not resolved according to their language.

      Steps to reproduce

      1. Make use of the attached endpoint testEndpoint_v1.yaml
      2. Create a basic page with a text and image component filled with a link to a page both in English and German website.travel.test.yaml
      3. Send a request to http://localhost:8080/magnoliaAuthor/.rest/delivery/testEndpoint/v1?lang=all

      Expected results

      Links in rich text fields are resolved for each locale

      Actual results

      Links in rich text fields are not resolved for each locale:

      "text": "<p>this is a test <a href=\"/magnoliaAuthor/visit-finland.html\">link</a></p>\n",
      "text_de": "<p>this is a test <a href=\"/magnoliaAuthor/visit-finland.html\">link</a> GERMAN</p>\n",
      

      However, sending a request with lang=de: http://localhost:8080/magnoliaAuthor/.rest/delivery/testEndpoint/v1?lang=de

      "text": "<p>this is a test <a href=\"/magnoliaAuthor/de/visit-finland.html\">link</a> GERMAN</p>\n",

      returns a correctly resolved link with the locale in the URL.

        Acceptance criteria

              dai.ha Dai Ha
              jayala Jonathan Ayala
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Bug DoR
                  Task DoD