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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 13.2-rc-1, 12.10.6
    • 12.10.5
    • REST
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: