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

Document translations are not marked correctly with translation=1 in the database of a newly created wiki

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Create a new wiki. Then run this script either in the main wiki or in the newly created wiki:

      {{velocity}}
      * $services.query.hql("where doc.space = 'Sandbox' and doc.translation = 0").setWiki('xwiki').execute()
      * $services.query.hql("where doc.space = 'Sandbox' and doc.translation = 1").setWiki('xwiki').execute()
      * $services.query.hql("where doc.space = 'Sandbox' and doc.translation = 0").setWiki('gang').execute()
      * $services.query.hql("where doc.space = 'Sandbox' and doc.translation = 1").setWiki('gang').execute()
      {{/velocity}}
      

      The output is this:

      • [Sandbox.TestPage3, Sandbox.TestPage2, Sandbox.TestPage1, Sandbox.WebPreferences, Sandbox.WebHome]
      • [Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome]
      • [Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebPreferences, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.TestPage1, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.WebHome, Sandbox.TestPage2, Sandbox.TestPage3]
      • []

      It seems the translation field is not set correctly in the database of the newly created wiki.

      I haven't noticed any issues, but I've used this field (translation) in my queries in the past and those queries will not return the expected results for the subwiki.

      I tested both using XWiki 5.4.5 and 6.2.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: