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

zh_CN Language Tag does not work properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 2.1.4, 2.2, 2.2.1
    • delivery

      Our partner dotSource has a problem with the content delivery endpoint. They have a multi-language site with 7 different languages. One of them is Taiwan (zh_CN). According to our documentation the configuration should look like this:

       
      So the node name is “zh_CN”. But when i do it like this and do some test request “localhost:8080/.rest/delivery/tours/v1?lang=zh_CN” i get the following error message:
      {
      "error":

      { "code": "badRequest", "message": "Language parameter: zh_CN is not allowed" }

      }
       
      After some debugging i found out that the class “I18nContainerRequestFilter” checks if the languageTag is valid “isValidLanguageTag”. But the right language Tag seems to be “zh-CN”.

       
      Everything works fine if i do the request like this: “localhost:8080/.rest/delivery/tours/v1?lang=zh-CN”
       
      dotSource tested with magnolia-rest-content-delivery-2.1.4
      I tested with magnolia-rest-content-delivery-2.2 with the standard Travel Demo
       
      The expectation from dotSource is that the API takes the same language tag wich our templating function is providing. -> https://documentation.magnolia-cms.com/display/DOCS62/cmsfn#cmsfn-Getlocalizedlinks
       
       

        Acceptance criteria

              Unassigned Unassigned
              tobias.kerschbaum Tobias Kerschbaum
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD