locked
Import-SPWeb : Could not find language 1034 RRS feed

  • Question

  • Hello,

    I am currently trying to move the 300+ existing webs under one site collection to separate site Collections. The Farm is on SP2010 - PowerShell is the way to do it and everything is shiny with the export, the import throws a specific error I can not get rid of.

    Import-SPWeb : Could not find language 1034.
    At line:125 char:21
    +         Import-SPWeb <<<<  -Identity $global:url -Path "$filepath.cmp" -Force
     -includeUserSecurity -UpdateVersions 2
        + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:
       SPCmdletImportWeb) [Import-SPWeb], SPException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

    What my script does:

    Get the web and all subwebs. Export them to a folder on the Server into a folder structure. Write the needed specifics of the structure into a xml-file. After this create the needed SPSite and SPwebs from the xml and import the exported data into this new structure.

    So far so good.On new webs this works without a problem, with the old pre-migration webs (the bigger part of the 300+ webs) this error is shown. What I already tried: Removing the UICulture from the old site and webs and adding the UICulture to the newly created sites. This does not work though.

    If you have some ideas, help, an already working script for this... I would really appreciate the help, as I am new to the whole PowerShell business (I am also thankful for criticism concerning my code).

    Find code and import.log attached below.

    $siteName = "Name" #like in http://sharepoint.net/-->siteName<-- $global:rootUrl = "http://xyz.net" $global:url = $global:rootUrl+"/$siteName" $global:path = "D:\Export" $global:rootpath = $global:path+"\$siteName" $global:xml ="" #---------------------------------------------------------------------- if ( (Get-PSSnapin -Name 'Microsoft.SharePoint.PowerShell' -ErrorAction SilentlyContinue) -eq $null ) { Add-PsSnapin 'Microsoft.SharePoint.PowerShell'} #---------------------------------------------------------------------- #starts the Export function Export-SPSubSites ($url) { $web = Get-SPWeb $global:url $global:xml = "<?xml version='1.0' ?>`r`n<collabroom name='$sitename' url='"+$web.ServerRelativeUrl +"'>`r`n" $global:path1 = $path $Outpath = $path+"\$sitename"+".xml" Export-SPSubWeb ($web) Get-SPSubWebs -StartWeb $web $global:xml += "</collabroom>" $global:xml | out-File -FilePath $Outpath Write-Host -f blue "Export Done!" } # Iterates over a site structure for the export and writes the structure into a xml file function Get-SPSubWebs ($StartWeb) { $webs = $StartWeb.GetSubwebsForCurrentUser() if ($webs.Count -gt 0) { $global:path1 = $path foreach ($nextWeb in $webs) { $nextweb.RemoveSupportedUICulture(1034) $global:xml += "<sub name='"+$nextweb.title+"' url='"+$nextweb.ServerRelativeUrl+"' template='"+$nextweb.WebTemplate+ "'></sub>`r`n" Get-SPSubWebs -StartWeb $nextWeb Export-SPSubWeb -ExportWeb $nextWeb $nextWeb.Dispose() } } } #Exports with predefined parameters function Export-SPSubWeb ($ExportWeb) { $global:path1 += [System.Text.RegularExpressions.Regex]::Replace($ExportWeb.ServerRelativeUrl,"[/]","\") mkdir $global:path1 $path2 = $global:path1+"/"+$sitename+".cmp" Write-Host -f green "Export" $Exportweb.url "to" $global:path1 Export-SPWeb $Exportweb.url –Path $path2 -IncludeUserSecurity -IncludeVersions All $ExportWeb.Dispose() } #loads XML File function get-xmlfile($root) { $xmlpath = $global:rootpath +".xml" [xml]$xmlfile = get-Content $xmlpath return $xmlfile } #Works iterative through given XML-File function work-xmlfile($xmlfile) { $nodelist = $xmlfile.collabroom foreach ($topnode in $nodelist) { import-byNode $topnode $True if($topmode.sub -ne $null) { foreach($subnode in $topnode.sub) { import-bynode $subnode $False } } } } #Import a export of a site structre py parameters in an XML file

    function import-byNode($node,[boolean]$needsSite) { $filepath = $global:rootpath+[System.Text.RegularExpressions.Regex]::Replace($node.url,"[/]","\") $managedPath = $global:rooturl +"/Sites" $global:url = $global:rooturl +"/Sites"+ $node.url Write-Host -f green "Reading exports from: "$filepath Write-Host -f green "...Checking if Site/Web exists" $exists = (Get-SPWeb $global:url -ErrorAction SilentlyContinue) -ne $null If(!$exists -AND $needsSite) { Write-Host -f green "Creating Site..." $global:url New-SpSite -URL $global:url -name $node.name -OwnerAlias "userID" -OwnerEmail "mailadresse@somemail.net" -ContentDatabase "DBalias" -Template $node.template } elseif (!$exists -AND !$needsSite) { Write-Host -f green "Creating Subweb..." New-SPWeb -URL $global:url -AddToTopNav -name $node.name -Template "STS#0" -UseParentTopNav } Write-Host -f green "Importing into.... "$url Import-SPWeb -Identity $global:url -Path "$filepath.cmp" -Force -includeUserSecurity -UpdateVersions 2 Write-Host -f green "Import done for" $global:url "`n`r`n`r" } #Main Method to start the Operation

    function main() { Start-SPAssignment –Global Export-SPSubSItes($url) work-xmlfile(get-xmlfile($global:rootpath)) Write-Host -f blue "Import Done!" Stop-SPAssignment –Global } cls main

    [11.12.2012 10:53:17] Start Time: 11.12.2012 10:53:17.
    [11.12.2012 10:53:17] Progress: Initializing Import.
    [11.12.2012 10:53:19] FatalError: Could not find language 1034.
    [11.12.2012 10:53:19] Debug:    at Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyInstalledLanguage(String id, String name)
       at Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirementObject reqObj)
       at Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate()
       at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
       at Microsoft.SharePoint.Deployment.SPImport.Run()
    [11.12.2012 10:53:19] Progress: Import did not complete.
    [11.12.2012 10:53:19] Finish Time: 11.12.2012 10:53:19.
    [11.12.2012 10:53:19] Duration: 00:00:02
    [11.12.2012 10:53:19] Finished with 0 warnings.
    [11.12.2012 10:53:20] Finished with 1 errors.


    • Edited by Neologismus_Phil Wednesday, December 12, 2012 7:06 AM forgot something
    Tuesday, December 11, 2012 10:00 AM

Answers

  • I am going to do this during the next maintenance window here. So far, I checked our produktive environment and the language ids are the right ones here - so no problems because the systems are not kongruent in this regard. After the maintenance window I will check this again and hopefully it is the fix so others running into similar problems will have an answer. Thx so far.
    Friday, December 14, 2012 7:53 AM

All replies

  • Is the Spanish language pack installed on the farm you're trying the import on?
    And  if it is, did you reboot the server after installing the Spanish language pack?

    ( see also http://social.technet.microsoft.com/Forums/en-US/sharepointadminlegacy/thread/470661a1-bafd-4446-aee6-b59402113257 )

    Tuesday, December 11, 2012 3:44 PM
  • Hi,

    Language packs Spanish used in the source site collection must also be installed on the destination site collection. Please check.

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Wednesday, December 12, 2012 5:58 AM
  • All languages were installed at the same time and a reboot did happen after that. The alternate languages where all activated through one script on on all sites.

    But I can not see the lcid 1034 there,as I, until now, only checked for the language name and not for the lcid. Spanish installed ist Spanish - Spain (Modern Sort) - lcid 3082 - and not Spanish - Spain (Traditional Sort) - lcid 1034.

    Going through the docu of the old SP2007 farm, it seem to me, that 1034 is an artifact originating from the old farm. 

    Is there any way to remove the spanish Version 1034 on all sites in the whole farm, maybe that is a possible way to solve this? Or would it be better to uninstall the 3082 version and afterwards install the 1034 version?

    thx4lot :)

    Wednesday, December 12, 2012 7:19 AM
  • Hi,

    As the 1034 language id is with 2007 old sites, I think it’s better to install the 1034 version.

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Thursday, December 13, 2012 5:48 AM
  • I am going to do this during the next maintenance window here. So far, I checked our produktive environment and the language ids are the right ones here - so no problems because the systems are not kongruent in this regard. After the maintenance window I will check this again and hopefully it is the fix so others running into similar problems will have an answer. Thx so far.
    Friday, December 14, 2012 7:53 AM
  • Hi,

    Thanks to this discussion i could solve my Problem quite fast. Thanks for the hint with 1034/3082 Language ID.

    I used following script to remove Spanish language Support before the Export.

     
    Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
     
    $siteUrl = "SHAREPOINT_SITEURL/"
    $uiCulture = 1034;
     
    $rootSite = Get-SPSite $siteUrl
    $allWebs = $rootSite.AllWebs
     
    foreach ($web in $allWebs) {
      Write-Host "Updating " + $web.Title + " " + $web.Url
      if ($web.IsMultilingual -eq $true) {
        $web.IsMultilingual = $true;
      }
         
      $web.RemoveSupportedUICulture($uiCulture);
      $web.Update()
    }
     

    Best regards

    Friday, November 15, 2013 2:51 PM