Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
2.2.6
-
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
- duplicates
-
XWIKI-11110 Document translations are not marked correctly with translation=1 in the database of a newly created wiki
- Closed