damaged

When I create a wiki page and need to move it to another subsite in WSS 3.0 it whipes out all my data. Is there any way around this I've tried to move it by copying and pasting using the explorer view and even tried to send the document to my computer and re-upload it but nothing. I'm guessing this has to do with the original document being tied to a GUID and once it's moved it gets a new GUID which is why all my data is lost Any suggestions Thanks.

FYI: I used the knowledge base template on this site which uses wiki pages as it's main source for new pages



Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

IsaacG

i too would like to know how to do this, and it did not work to just copy the .aspx files in explorer.

also the send to does not yield a sharepoint library location.

any help would be greatly appreciated.





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

Curtis Ruppe (MicroStaff IT)

The pages in the document library (if memory serves me correctly) are just placeholders. You need to migrate the content over from the list item properties as appropriate. There are a few ways to do this, but if you are looking for the easy way out, you can always save the internal Wiki Pages library as a list template (with content), and then create this list again within your subsite.





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

damaged

I finally figured it out. I used VisualStudio to make a generic GUI that has two text boxes. One is where you enter the source url and the other is where you enter the target url. The source url is the link of the document you want to move, like a wiki page (http://server/sub-site/file-name.aspx). Also, make sure if you copy the link from the url that you remove any instance of the space code '%20' and change it back to a regular blank space otherwise it will not work. The target url is where you want to place the file. Again, make sure there are no '%20' in the target url. All you have to specify is the subsite and make sure that both document libraries are based off of the same template (http://server/sub-site). I'm not sure if they need to be the same name as well or not

Code Snippet

public void ExportImport(String sourceUrl, String targetUrl)

{

try

{

SPExportObject exportObject = new SPExportObject();

exportObject.Type = SPDeploymentObjectType.File;

exportObject.Url = sourceUrl;

exportObject.ExcludeChildren = false;

exportObject.IncludeDescendants = SPIncludeDescendants.All;

SPExportSettings settings = new SPExportSettings();

settings.SiteUrl = sourceUrl;

settings.BaseFileName = "export.cab";

settings.FileLocation = @"C:\";

settings.CommandLineVerbose = true;

settings.IncludeSecurity = SPIncludeSecurity.All;

settings.IncludeVersions = SPIncludeVersions.All;

settings.ExcludeDependencies = false;

settings.ExportObjects.Add(exportObject);

settings.ExportMethod = SPExportMethodType.ExportAll;

settings.FileCompression = true;

settings.OverwriteExistingDataFile = true;

settings.LogExportObjectsTable = true;

settings.LogFilePath = @"C:\";

settings.Validate();

SPExport export = new SPExport(settings);

export.Run();

}

catch (Exception error)

{

Console.WriteLine(error.StackTrace.ToString());

catchErrors = String.Format("**EXPORT ERROR: {0} ", error.Message);

txtResults.Text = catchErrors;

}

try

{

SPImportSettings settings = new SPImportSettings();

settings.SiteUrl = targetUrl;

settings.BaseFileName = "export.cab";

settings.FileLocation = @"C:\";

settings.FileCompression = true;

settings.IgnoreWebParts = false;

settings.IncludeSecurity = SPIncludeSecurity.All;

settings.RetainObjectIdentity = false;

settings.UpdateVersions = SPUpdateVersions.Append;

settings.UserInfoDateTime = SPImportUserInfoDateTimeOption.ImportAll;

settings.WebUrl = targetUrl;

settings.CommandLineVerbose = true;

settings.LogFilePath = @"C:\";

settings.Validate();

SPImport import = new SPImport(settings);

import.Run();

}

catch (Exception error)

{

Console.WriteLine(error.StackTrace.ToString());

catchErrors += String.Format("**IMPORT ERROR: {0}", error.Message);

txtResults.Text = catchErrors;

}

}





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

IsaacG

I'm not that savvy with visual studio but have it installed.

Can you kindly point me to how to create such a gui in visual studio using your code

Doing this will probably help me learn visual studio as well.

thanks,

Isaac





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

damaged

It's probably to indept to explain the whole process here on the forums. If you want I can zip up the program and send it to you via email.





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

IsaacG

sure email is fine....let me know if you can't pull the address off my profile.

thanks,

Isaac





Re: SharePoint - General Question and Answers and Discussion Help: moving a wiki page

quiteclear

I'm facing the same problem - can you send the zip my way

Thanks