[英]“Save Site as Template” Error when using LookupSite columns
After long search on the web i could not figure out why i have been facing wired behaviour today with my SharePoint Site. 经过长时间的网上搜索,我不知道为什么今天我的SharePoint网站面临有线行为。
I explain, 我解释,
I have a Site Collection ( Blank Site
Template) which contains lists
content types
and site columns
. 我有一个网站集(
Blank Site
模板),其中包含lists
content types
和site columns
。
I have no specific configuration in my web app and no special configuration in my site collection. 我的Web应用程序中没有特定的配置,网站集中也没有特殊的配置。
When i tried to save Site as Template
i got error telling there was a problem with a site field
(which was a site colum of type LookUp
). 当我尝试
save Site as Template
出现错误,提示site field
存在问题(这是LookUp
类型的网站列)。
Ps: I have a list based on a content type which is based on that site column
附:我有一个基于基于该网站栏的内容类型的列表
When i removed that site column
the operation of template creation succeded, which is kind of wired. 当我删除该
site column
,模板创建操作成功,这是一种连接。
Has anyone faced this before? 有人遇到过吗? Can anyone reproduce this issue?
任何人都可以重现此问题吗? and how can i find a workaround to this issue because i need that column to be of type
lookup
. 以及如何找到解决此问题的方法,因为我需要该列的类型为
lookup
。
Can anyone help me please? 谁能帮我吗?
This is a know issue with "Save Site As Template", this operation is not full fidelity Because as you said you can do it if you add the Site colum
from SharePoint
(from The UI) and not from Visual Studio
... 这是“将网站另存为模板”的一个已知问题,此操作不是完全保真的,因为如您所说,如果您是从
SharePoint
(从UI)而不是从Visual Studio
添加Site colum
,则可以这样做。
Here, you can deduct that this issue is related to Visual Studio
and What is happening behind the deployment Action... 在这里,您可以推断出此问题与
Visual Studio
有关,并且与部署操作有关...
This Problem Has many Workaround Solutions: 此问题有许多解决方法:
First, you can see the deployment order of your content types and your lists etc. in the .Package
file (Design Mode), there you must find the elements in a precise order, for example the Parent SiteColumn and its related content type and list(instance and definition) must come before the child siteColumn (The One containing the lookup) to let SharePoint provison the dependent Fields in the correct order. 首先,您可以在
.Package
文件(设计模式)中查看内容类型和列表等的部署顺序,在那里您必须以精确的顺序找到元素,例如Parent SiteColumn及其相关的内容类型和列表。 (实例和定义)必须位于子siteColumn(包含查找的那个)之前,以便SharePoint以正确的顺序为从属字段提供证明。 This action is more detailed in this Post 此操作在本帖子中有更详细的说明
Secondly, as in this link you need to put the OverWrite Attribute in the Elements.xml of the SiteColumn with the lookup, your Elements.xml should look like something like This 其次,在此链接中,您需要通过查找将OverWrite属性放入SiteColumn的Elements.xml中,您的Elements.xml应该看起来像这样:
<Field
ID="{c2f3c9d3-2433-45d5-89a2-4899dc9642f1}"
Name="FieldName"
DisplayName="FieldDisplayName"
Type="Lookup"
List="Lists/YourList"
ShowField="FieldToLookupOn"
Overwrite="TRUE"
Required="FALSE"
Group="Custom Site Columns">
</Field>
And Finally, There is one more work around, it's about to try to BackUp
then Restore
the site using PowerShell
Commands. 最后,还有另一种解决方法,即将尝试
BackUp
然后使用PowerShell
命令Restore
站点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.