There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-abb65ba9-6086-4d66-b027-1a5ce235b5d5 XWIKI-14047 Closed

CopyDocument with overwrite existing does not overwrite existing translations, making a failed partial copy

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-ff971000-4dcb-483d-9e75-292330039cc7 Changes by Simon Urli on 27/Feb/25 13:57
 
Resolution: Cannot Reproduce
Status: Reopened Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-ff971000-4dcb-483d-9e75-292330039cc7 Simon Urli on 27/Feb/25 13:57
 

Tested on 17.1.0 with following script:

{{velocity}}
#set ($sourceDoc = 'xwiki:BeforeCopy.WebHome')
#set ($targetDoc = 'xwiki:AfterCopy.WebHome')

$xwiki.copyDocument($sourceDoc, $targetDoc, $NULL, false, true)
{{/velocity}}

After creating both pages and translations in both pages. This returns true and the translation are overwritten.
I believe this has been fixed by either XWIKI-16146 or XWIKI-19609 since they changed the logic of XWiki#copyDocument.