This issue has been created
There is 1 comment.
 
 
Book Versions / cid:jira-generated-image-avatar-e6c0d15f-fe5d-440b-8fea-4c05955be8a7 BVERSION-249 Open

Cannot mark a page as deleted on a subwiki when XWiki is deployed in the ROOT context

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-be685426-ba29-48b9-aab3-f7b9d2744072 Anca Luca created this issue on 08/Jun/26 23:14
 
Summary: Cannot mark a page as deleted on a subwiki when XWiki is deployed in the ROOT context
Issue Type: cid:jira-generated-image-avatar-e6c0d15f-fe5d-440b-8fea-4c05955be8a7 Bug
Affects Versions: 1.27
Assignee: Unassigned
Components: Administration menu
Created: 08/Jun/26 23:14
Priority: cid:jira-generated-image-static-major-ac00b20c-4fe5-438a-9143-f32e6fa49b0c Major
Reporter: Anca Luca
Description:

When XWiki is installed as the ROOT application (without the /xwiki/ particle in the URL), the "mark as deleted" menu in a page's "Versions" menu points to:

https://<domain name>//wiki/<subwiki name>/view/BookVersions/Code/SwitchDeletedMark?[...]

with the double slash between the domain name and the /wiki/ particle.

For the subwiki, this double slash is not processed properly by XWiki and the resource corresponding to the URL is not found.

Surprinsingly, on the main wiki the corresponding URL with double slashes

<domain name>//bin/view/BookVersions/Code/SwitchDeletedMark?[...]

works fine, but this is just a chance, this URL should not contain 2 slashes.

 
 

1 comment

 
cid:jira-generated-image-avatar-be685426-ba29-48b9-aab3-f7b9d2744072 Anca Luca on 08/Jun/26 23:18
 

This is related to this way of generating the URL here https://github.com/xwiki-contrib/book-versions/blob/master/application-book-versions-ui/src/main/resources/BookVersions/Code/AdministrationMenu.xml#L184 , which assumes there is always a context, which is not the case in the case of an application deployed as ROOT.

Ideally this code should use some sort of javascript URL factory (IIRC there is one), or, if there is no such thing, should have some more conditions when generating the URL, to cover for this case.