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

Previewing a new document cause XWD_TRANSLATION to be set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 2.2.6
    • Old Core
    • any
    • patch
    • Unknown
    • Awaiting Contributor feedback

    Description

      This issue create corrupted records in xwikidoc table that could be found using the following request:

      select XWD_FULLNAME, XWD_DEFAULT_LANGUAGE, XWD_LANGUAGE, XWD_TRANSLATION from xwikidoc where (XWD_LANGUAGE = "" OR (XWD_LANGUAGE IS NULL and "" IS NULL)) and XWD_TRANSLATION != 0

      I have attached a very careful patch (not so beautiful since the whole stuff is badly designed) that shoud avoid this issue. To fix older records, a database migration code should be written to execute in HQL the equivalent of:

      update xwikidoc set XWD_TRANSLATION=0 where (XWD_LANGUAGE = "" OR (XWD_LANGUAGE IS NULL and "" IS NULL)) and XWD_TRANSLATION != 0;

      I let you wrote it, since I am not well aware of the database migration procedures.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: