简体   繁体   English

使用LookupSite列时出现“将网站另存为模板”错误

[英]“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 typessite 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.

相关问题 使用模板类时的内部编译错误 - internal compiling error when using template class 仅当使用NetworkService时,站点才不会使用ApplicationPoolIdentity在本地启动:“ HTTP错误503。该服务不可用。” - Site wont start on local using ApplicationPoolIdentity, only when using NetworkService: “HTTP Error 503. The service is unavailable.” VS2013中尝试部分专门化另一个模板的类模板时出现错误 - Error in VS2013 when attempting to partially specialize a class template with another class template 在Microsoft版本管理中使用vNext模板时出现OperationFailedException - OperationFailedException when using vNext template in Microsoft Release Management Unique_ptr模板错误 - Unique_ptr template error Visual Studio在连接时使用TFS GIT错误 - Visual Studio using TFS GIT error when connecting 将DCMTK与Visual Studio一起使用时,链接器错误LNK2019 - Linker error LNK2019 when using DCMTK with Visual Studio 如何消除模板代码中的“除以0”错误 - How to eliminate “divide by 0” error in template code 错误jQuery模板脚本中出现意外字符&#39;$&#39; - error Unexpected character '$' in jQuery template script MVC音乐商店教程和网站管理工具出现错误 - Error with the MVC Music Store Tutorial and the Web Site Administration Tool
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM