Web 部件或 Web 窗体控件不能显示在 SharePoint Web 部件页上 (KB5029605)

应用对象
SharePoint Server Subscription Edition SharePoint Server 2019 SharePoint Server 2016 SharePoint Server 2013 SP1

症状

无法显示 Web 部件页上的 Web 部件或 Web 窗体控件。 此外,Web 部件或 Web 窗体控件还会在 SharePoint 统一日志记录系统 (ULS) 日志中生成以下错误消息和“6ti0”事件标记:

注意

找到不安全的 PropertyName: <UnsafePropertyName>

原因

出现此问题是因为为 DataFormParameter Web 部件不支持的属性设置了不安全的属性名称。

解决方法

如果你是场管理员,可以通过运行以下命令将属性名称添加到 WebPartSupportedSimplePropertyNames 列表中来解决此问题:

add-pssnapin *
$f=get-spfarm
$f.AddGenericAllowedListValue("WebPartSupportedSimplePropertyNames","<UnsafePropertyName>")
$f.update()