how to import space with duplicate key without changing watches and created by

Hi All,

Is there a way to import a space which has duplicate space key without changing created by and watches. I have tried several ways to copy a space like script runner, confluence cli but failed. tried doing manual change in xml but it doesnt change all keys.
Is there a way to import space without effecting anything except space key??

its a standalone server with 6.1.2 ver.

1 answer

0 vote
Ann Worley Atlassian Team Jan 22, 2018

Hi Syed,

When you changed the XML, did you follow this doc: How to copy or rename a space in Confluence?

I tried the plugins listed on that page and both of them changed the "created by" to the admin user who copied the space. You already tried the CLI tool, so the XML find and replace is the best bet remaining.

Please let us know how it goes.

Thanks,

Ann

I tried doing find and replace and it failed stating duplicate space key. so assuming there are more occurance of it somewhere. I can just do find and replace for word "pi" but it could change lot many places where it should not. example between words like "pi" for "pizza" will change to new "spacekey+zza"

Ann Worley Atlassian Team Jan 22, 2018

Syed, please see this link Solution 3 for details of what to search for, and let me know if that helps. :) Ann

Hi Ann,
I tried solution 3 it successfully imported the space and after re indexing I can search space name or page name but could not open. 
Getting error " Page not found, The page you were trying to reach could not be found: it may have been renamed or moved to another space, or the name you requested may be incomplete"  and below it shows page which I cannot access and get same error.

In Logs i can see error "ERROR [http-nio-8090-exec-13] [plugin.descriptor.web.ConfluenceWebInterfaceManager] getHtml Failed to render web panel:com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel@16aa8ec1 "

Also could not see space in space directory to delete it. any suggestions how I can delete and try again?

I have tried creating new space by same key and site just hangs. I tried by CLI and get this error:
Remote error: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only


When I try deleting through remove space, I get
Remote error: Cannot find space with key: PREDI

@Ann Worleyis there a way to delete space other than UI? 

Ann Worley Atlassian Team Jan 23, 2018

Hi Syed,

I was just looking at your case when I saw your update.

Based on the previous error, "Failed to render web panel", I wanted to share: After updating a Third Party Add-on some functions may not be available or render incorrectly and ask you to try Disabling or enabling all add-ons (using Safe Mode)

For removing the space: If you are unable to access the space at all from the UI, you can run the deletion from the URL directly at:

 http://<baseURL>/spaces/removespace.action?key=<insert space key>

If that fails to work, refer to: After a failed space import, it's not possible to re-import because of leftover space data

Because of the "page not found" message, please try reindexing from scratch as described in: How to Rebuild the Content Indexes From Scratch on Confluence Server

I look forward to your next update.

Thanks,

Ann

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

380 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you