在页面库上创建 DataView

发布于 2024-12-23 06:49:17 字数 811 浏览 1 评论 0原文

我认为创建一个可重用的数据视图 Web 部件是一个问题,该部件将被提供参数以基于 WebURL 跨站点工作,但这对我来说已经变成了一个更大的问题。直到昨天,我在页面库上创建数据视图时还没有遇到任何问题。现在,我尝试创建一个数据视图并仅引入 @Title 字段,通过将 ViewFlag 属性从“8”更改为“0”使其跨站点工作,并且将 ListID 参数添加到 ListName 并将其发送到图库。

尝试将其添加到任何页面都会收到:

尝试将项目添加到页面时发生错误。

同样,我已经在页面库上创建了多个数据视图,这些数据视图使用相同的步骤要复杂得多。我什至已提供 WebURL 参数,以便我可以使用此 Web 部件从子站点的页面库中获取数据。

我尝试检查错误日志,但由于我缺乏经验,无法完全理解其含义。

我注意到的其他事情:

我的 web 部件在 SharePoint Designer 中 100% 工作,并应用了所有过滤/样式。尝试更改浏览器中的参数会收到此错误:

无法保存此 Web 部件的所有属性设置。发生错误。

更新: 发生此错误的原因是因为在参数编辑器中更改参数后,我检查了 XSL 编辑器,它被清除了。

此外,我在自定义列表中创建了相同的列,并且能够完美地实现所有内容,这让我相信问题出在数据源上。

任何帮助,甚至是正确方向的观点都会有所帮助。这对我目前的订婚来说是一个彻底的阻碍。

What I thought was an issue creating a reusable dataview webpart that would be parameter fed to work across sites based on the WebURL has turned into a larger problem for me. Until yesterday, I hadn't had any issues creating dataviews on the pages library. Now, I try and create a dataview and bring in just the @Title field, make it work across sites by changing the ViewFlag property from '8' to '0' and the ListID parameter to ListName and send it to the gallery.

Attempting to add it to any page receives:

An error occurred while attempting to add the item to the page.

Again, I have created multiple data-views on the pages library already that are much more complex using the same steps. I've even made the WebURL parameter fed so I can use this webpart to grab data from the pages library of sub sites.

I've tried checking the error log and am unable to fully comprehend its meaning given my lack of experience.

Other things I have noticed:

My webpart works 100% in SharePoint Designer with all of the filtering/styling applied. Trying to change the parameters in the browser receives this error:

Cannot save all of the property settings for this Web Part. An error has occurred.

UPDATE: The reason that this error occurs is because after I change the parameter in the parameter's editor, I checked the XSL editor and it is wiped clean.

Furthermore, I've created the same columns in a custom list and was able to implement everything perfectly fine leading me to believe that the problem resides with the data source.

Any help or even a point in the right direction would be helpful. This is a complete show stopper for my current engagement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我只土不豪 2024-12-30 06:49:17

问题根本不是我想象的那样。它最终源于我添加到页面内容类型的一列。从所有页面库中删除后,一切正常。

The problem was not at all what I had thought. It ended up stemming from a column I added to the page content type. once removed from all the pages libraries everything worked as normal.

溺深海 2024-12-30 06:49:17

我将首先在与数据源相同的站点上(在测试页面上)创建与您希望的完全一样的 Web 部件。当您拥有所需的功能后,您可以执行 viewflag/listID 操作以使其跨站点工作并在子站点上实现。

I would start by creating the web part exactly like you want it on the same site as the data source (on a test page). When you have it like you want it, you can then do the viewflag/listID thing to make it work across site and implement it on a subsite.

孤蝉 2024-12-30 06:49:17

只是为了让其他人知道谁正在寻找此错误的解决方案,这似乎是由 DataFormWebParts / XSLTListViewWebParts 的 参数中的条目太多引起的,

我已经能够确认,客户的特别是笨拙的列表(基于调查的列表),SP 设计器将所有列表的许多列添加到此标签,尽管我只选择了其中的一小部分用于列表视图。尝试附加浏览器中的任何更改会导致OP中详细说明的错误。

标记中存在的字段减少为仅视图运行所需的字段,从而纠正了此问题。

Just to let anyone else know who is looking for a solution to this error, this can seemingly be caused by too many entries in the parameter for DataFormWebParts / XSLTListViewWebParts

I have been able to confirm, with a client's particularly unwieldy list (a survey based list as it happens), that SP Designer was adding all of the lists' many columns to this tag, despite my having only selected a small number of them for a list view. Trying to append any changes from the browser resulted in the error detailed in the OP.

Reducing the fields present in the tag to only those required for my view to function, corrected this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文