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

Syed Ehteshamuddin January 22, 2018

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 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 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

Syed Ehteshamuddin January 22, 2018

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"

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2018

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

Syed Ehteshamuddin January 23, 2018

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?

Syed Ehteshamuddin January 23, 2018

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

Syed Ehteshamuddin January 23, 2018

@AnnWorleyis there a way to delete space other than UI? 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 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
TAGS
AUG Leaders

Atlassian Community Events