This issue has been created
There are 7 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-777ab8aa-107d-4f16-9e13-913e79133805 XWIKI-23492 Closed

Bad error message when copying a wiki to an id that already exists

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7aa5becd-ae67-4205-b3ea-8c45b2597082 Vincent Massol created this issue on 28/Aug/25 16:04
 
Summary: Bad error message when copying a wiki to an id that already exists
Issue Type: cid:jira-generated-image-avatar-777ab8aa-107d-4f16-9e13-913e79133805 Bug
Affects Versions: 16.10.0
Assignee: Unassigned
Components: Wiki
Created: 28/Aug/25 16:04
Priority: cid:jira-generated-image-static-major-debb5b2b-b974-4f9c-b110-d5f1fe4d4c48 Major
Reporter: Vincent Massol
Description:

Right now:

    @Test
    void copyWhenWikiAlreadyExists() throws Exception
    {
        when(this.store.isWikiNameAvailable(any(String.class), any(XWikiContext.class))).thenReturn(true);
        // The wiki already exists
        when(this.wikiDescriptorManager.exists("existingid")).thenReturn(true);

        Throwable exception = assertThrows(WikiManagerException.class, () -> {
            this.wikiManager.copy("wikiid", "existingid", "newwikialias", true, true, true);
        });
        assertEquals("The wiki id [existingid] is already used or is a reserved id, and thus is not available.",
            exception.getMessage());
    }
 
 

7 updates

 
cid:jira-generated-image-avatar-7aa5becd-ae67-4205-b3ea-8c45b2597082 Changes by Vincent Massol on 28/Aug/25 16:04
 
Fix Version: 17.8.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Vincent Massol
Resolution: Fixed
Tests: Unit
Status: Open Closed