-
Bug
-
Resolution: Fixed
-
Medium
-
2.10
-
None
Confluence is supposed to enforce a unique page title per space rule, but the XML-RPC interface rename function doesn't enforce this rule. I haven't confirmed this but a user has reported it in 2.10.
The rename workaround is undocumented but apparently already used by the Doc importer ( http://confluence.atlassian.com/display/DOC/Navigating+to+the+Doc+Import+Option ). It will split a Word document into multiple Confluence pages based on headings, but if there are two headings that are the same, it'll create two pages with the same name, and they'll be identified with a "pageId" instead of by the name.
While you can't add a page with a duplicate name via XML-RPC, you can rename an existing page to a duplicate name. To reproduce:
# create page 1 page1 = {'content': 'some content', 'title': 'test', 'space': 'TEST'} res1 = xmlrpc.confluence1.storePage(token, page1) # try to create page 2 with same name, as sub page of page 1 page2 = page1.copy() page2["parentId"] = res1["id"] # fails with com.atlassian.confluence.rpc.RemoteException: # The page you are trying to create already exists. # give it a unique name and create page2["title"] = 'test2' res2 = xmlrpc.confluence1.storePage(token, page2) # rename page 2 to same as page1 name res2["title"] = page1["title"] res2 = xmlrpc.confluence1.storePage(token, res2)
- is caused by
-
CONFSERVER-9213 PageManager can create Duplicate Pages
- Closed