SharePoint root site

%3CLINGO-SUB%20id%3D%22lingo-sub-1627423%22%20slang%3D%22en-US%22%3ESharePoint%20root%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1627423%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone.%3C%2FP%3E%3CP%3EI've%20recently%20had%20the%20need%20to%20redesign%20and%20restructure%20my%20company%20sharepoint%20site.%20I've%20made%20a%20new%20homepage%20(communication%20site)%20and%20did%20everything%20I%20wanted%20to%20do%20with%20it.%20I%20then%20disassociated%20it%20as%20a%20hub%20site%20and%20tried%20replacing%20the%20current%20root%20site.%20I%20select%20the%20current%20root%20%26gt%3B%20replace%20root%20site%20%26gt%3B%20enter%20the%20new%20url%20(I%20get%20the%20green%20text%20saying%20that%20the%20url%20can%20be%20used)%20and%20then%20click%20save.%20The%20arrow%20icon%20then%20spins%20for%20a%20few%20seconds%20with%20%22Replacing%20root%20site%22%20before%20giving%20an%20error%20%22Couldn't%20replace%20root%20site%22%20and%20try%20again%20in%2010%20mins%20(I've%20tried%20this%20lots%20of%20times%20now!).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20then%20tried%20the%20invoke-spositeswap%20cmdlet%20but%20was%20hit%20with%20this%20error%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3EInvoke-SPOSiteSwap%20%3A%20The%20new%20site%20name%20is%20too%20long%20using%20URL%20%3CA%20href%3D%22https%3A%2F%2Fdortekhull.sharepoint.com%2Fsites%2Farchive%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fxxxxxxxxxx.sharepoint.com%2Fsites%2Farchive%3C%2FA%3E.%20The%20path%20for%20all%20files%20and%20folders%20in%20the%20site%20cannot%20exceed%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E400%20characters%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3EAt%20line%3A1%20char%3A1%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%2B%20Invoke-SPOSiteSwap%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%2B%20~~~~~~~~~~~~~~~~~~%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BInvoke-SPOSiteSwap%5D%2C%20ServerException%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.SharePoint.Client.ServerException%2CMicrosoft.Online.SharePoint.PowerShell.SwapSite%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20imagine%20that%20there%20are%20some%20file%20extensions%20that%20are%20really%20long%20but%20we%20have%20thousands%20of%20files%20and%20folders.%20I%20don't%20know%20what%20to%20do!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20at%20a%20loss.%20I've%20gone%20over%20my%20go%20live%20deadline%20and%20stuck%20with%20users%20still%20being%20directed%20to%20our%20old%20site.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20advice%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20Dave%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1627423%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1633715%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20root%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1633715%22%20slang%3D%22en-US%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F745390%22%20target%3D%22_blank%22%3E%40DangerousDave%3C%2FA%3E%26nbsp%3BI%20think%20an%20easy%20option%20is%20to%20export%20the%20archive%20library%20to%20Excel.%20The%20export%20option%20is%20available%20in%20your%20library.%20Optional%20you%20can%20create%26nbsp%3Ba%20temp.%20view%20to%20enable%20the%20option%20show%20all%20items%20without%20folders.%20In%20the%20export%20you%20find%20the%20filename%20and%20file%20path.%20If%20you%20combine%20your%20full%20site%20url%20with%20the%20path%20and%20filename%20you%20can%20count%20the%20characters.%20So%20you%20know%20which%20items%20exceeds%20the%20400%20characters%20limit.%20With%20the%20information%20it's%20easier%20to%20modify%20%2F%20move%20these%20files.%20For%20the%20case%20you%20have%20to%20verify%20that%20the%20view%20returns%20all%20items.%20An%20additional%20option%20is%20always%20PowerShell.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Visitor

Hi everyone.

I've recently had the need to redesign and restructure my company sharepoint site. I've made a new homepage (communication site) and did everything I wanted to do with it. I then disassociated it as a hub site and tried replacing the current root site. I select the current root > replace root site > enter the new url (I get the green text saying that the url can be used) and then click save. The arrow icon then spins for a few seconds with "Replacing root site" before giving an error "Couldn't replace root site" and try again in 10 mins (I've tried this lots of times now!). 

 

I then tried the invoke-spositeswap cmdlet but was hit with this error;

Invoke-SPOSiteSwap : The new site name is too long using URL https://xxxxxxxxxx.sharepoint.com/sites/archive. The path for all files and folders in the site cannot exceed
400 characters
At line:1 char:1
+ Invoke-SPOSiteSwap
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-SPOSiteSwap], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SwapSite

 

I can imagine that there are some file extensions that are really long but we have thousands of files and folders. I don't know what to do!

 

I'm at a loss. I've gone over my go live deadline and stuck with users still being directed to our old site.

 

Any advice?

 

Thanks, Dave

1 Reply
Highlighted

@DangerousDave I think an easy option is to export the archive library to Excel. The export option is available in your library. Optional you can create a temp. view to enable the option show all items without folders. In the export you find the filename and file path. If you combine your full site url with the path and filename you can count the characters. So you know which items exceeds the 400 characters limit. With the information it's easier to modify / move these files. For the case you have to verify that the view returns all items. An additional option is always PowerShell.