Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18478

It's not always possible to know the default locale from a page translation REST resource without making another request

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.10.5
    • Fix Version/s: 13.2-rc-1, 12.10.6
    • Component/s: REST
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Because of XWIKI-18477 the page translation REST resource returns empty default locale for any page translation that was created by the user. In order to determine the default locale you need to make another HTTP request for the original document which is a pain and a waist of resources and time.

      For instance, create the Romanian translation forĀ Sandbox.TestPage1 and then access:

      http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox/pages/TestPage1/translations/ro?media=json
      

      The default translation is empty. You need to make another call to:

      http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox/pages/TestPage1?media=json
      

      in order to determine the actual default locale.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: