源网站集(http://abcd.com/)导航引发错误 - “托管导航术语集未正确附加到网站” [英] The source site collection (http://abcd.com/) navigation throws error - "The managed navigation term set is improperly attached to the site"

查看:102
本文介绍了源网站集(http://abcd.com/)导航引发错误 - “托管导航术语集未正确附加到网站”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用Powershell将术语组从一个网站集导入到另一个网站集中$


#Export the XML

$ siteCollectionUrl =" http://abcd.com/"

$ filePath =" c:\ path \to\file\siteCollectionTermGroup.xml"
$


Connect-PnPOnline -Url $ siteCollectionUrl -UseWebLogin

Export-PnPTermGroupToXml - Out $ filePath -Identity" 00000000-0000-0000-0000-000000000000"



[xml] $ xml = Get-Content -Path $ filePath



foreach($ term.mermGroups.TermGroup中的$ termGroup){  

    if(!$ termGroup.Name.Equals(" {sitecollectiontermgroupname}"))){

        $ xml.TermGroups.RemoveChild($ termGroup)

    }
}



$ xml.save($ filePath)





#导入XML

$ siteCollectionUrl =" http://defg.com"

$ filePath =" c:\ path \to\file\siteCollectionTermGroup.xml"
$


Connect-PnPOnline -Url $ siteCollectionUrl -UseWebLogin

Import-PnPTermGroupFromXml - path $ filePath



Hi,

I am importing the term group from one site collection to another site collection using Powershell

#Export the XML
$siteCollectionUrl = "http://abcd.com/"
$filePath = "c:\path\to\file\siteCollectionTermGroup.xml"

Connect-PnPOnline -Url $siteCollectionUrl -UseWebLogin
Export-PnPTermGroupToXml -Out $filePath -Identity "00000000-0000-0000-0000-000000000000"

[xml]$xml = Get-Content -Path $filePath

foreach ($termGroup in $xml.TermGroups.TermGroup) {  
    if (!$termGroup.Name.Equals("{sitecollectiontermgroupname}")) {
        $xml.TermGroups.RemoveChild($termGroup)
    }
}

$xml.save($filePath)


#Import the XML
$siteCollectionUrl = "http://defg.com"
$filePath = "c:\path\to\file\siteCollectionTermGroup.xml"

Connect-PnPOnline -Url $siteCollectionUrl -UseWebLogin
Import-PnPTermGroupFromXml -path $filePath

为了解决错误"托管导航术语集未正确附加到站点"我进入http://defg.com,

我改变当前&从管理到结构化的全球导航然后再将其从Structured更改为Managed。



$ web1 = get-spweb http://defg.com

$ navSetting1 = new-object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($ web1)

$ navSetting1.CurrentNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource] :: PortalProvider

$ navSetting1.GlobalNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource] :: PortalProvider 

$ navSetting1.Update() 

< br $>


$ web2 = get-spweb http://defg.com

$ navSetting2 = new-object Microsoft.SharePoint.Publishing.Navigation。 WebNavigationSettings($ web2)

$ navSetting2.CurrentNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource] :: TaxonomyProvider

$ navSetting2.GlobalNavigation.Source = [ Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource] :: TaxonomyProvider 

$ na vSetting2.Update() 



In order to solve the error "The managed navigation term set is improperly attached to the site" that I get in http://defg.com,
I change the Current & Global Navigation from Managed to Structured & then change it back again from Structured to Managed.

$web1 = get-spweb http://defg.com
$navSetting1 = new-object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($web1)
$navSetting1.CurrentNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource]::PortalProvider
$navSetting1.GlobalNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource]::PortalProvider 
$navSetting1.Update() 


$web2 = get-spweb http://defg.com
$navSetting2 = new-object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($web2)
$navSetting2.CurrentNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource]::TaxonomyProvider
$navSetting2.GlobalNavigation.Source = [Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource]::TaxonomyProvider 
$navSetting2.Update() 

现在http://defg.com导航工作正常。



Now http://defg.com navigation works fine.

但现在,源网站集(http://abcd.com/)导航错误 - "托管导航术语设置未正确附加到网站上"



如何解决此错误?



请提供解决方案尽快.b

But now, the source site collection (http://abcd.com/) navigation throws error - "The managed navigation term set is improperly attached to the site"

How do I solve this error?

Please provide resolution ASAP.

推荐答案

T < span style ="">他可能只是其中一个术语未正确保存,您可以尝试编辑术语并再次保存术语。 然后您可以尝试一次又一次刷新
页面。

The cause maybe just one of the terms have not been properly saved, you can try to edit the terms and save the terms again.  And then you can try to refresh the page again and again.


这篇关于源网站集(http://abcd.com/)导航引发错误 - “托管导航术语集未正确附加到网站”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆