带有搜索 Web 部件和包含 UpdatePanel 的用户控件的共享点页面上出现 Javascript 错误
一段时间以来,我一直试图找到此错误的原因,但没有成功...
我们有一个在外观和风格方面进行了高度自定义的 SharePoint 2007 网站。
在母版页中插入了一个用户控件,该控件使用更新面板来部分呈现控件中的更新。
用户控件似乎在所有页面上都能正常工作,除非将搜索 Web 部件插入到页面中。
该控件有一个 DropDownList,可以根据用户选择隐藏或显示不同的面板。 每个面板中还有一些按钮会导致异步回发。
将“搜索核心结果”Web 部件插入页面时,所有异步请求都会导致 JavaScript 错误,并且更新面板中不会发生任何更新。
javascipt错误是:
Sys.WebForms.PageRequestManagerServerErrorException: 对象引用未设置为 对象的实例。
问题是我什至不知道这个物体是什么。它似乎是 ScriptManager(尽管它位于母版页中)。
有没有办法获得此错误的详细描述? 此外,更新面板和 SharePoint 搜索 Web 部件是否存在任何已知的冲突或问题?
我对 SharePoint 开发还比较陌生,并且仍在尝试寻找自定义和调试的方法。
更新: 我使用 fiddler 检查请求和响应。
在请求中,我看到的唯一区别是,没有搜索 Web 部件,它包含 NTLM 授权标头,而带有 Web 部件的页面上的请求没有授权标头。
在响应中,有效的页面有一个私有缓存控制,其中设置了一些cookie(我猜是为了身份验证),而其他的则没有缓存,也没有设置cookie。此外,响应文本包含更新后的控件(当其工作时),而其他页面则返回以下内容:
53|错误|500|未将对象引用设置为对象的实例。|
授权可能是这里的问题吗?
I've been trying to find a cause for this error for some time to no avail...
We have a SharePoint 2007 site heavily customized in terms of look and feel.
In the master page a user control has been inserted that uses an update panel to partially render updates in the control.
The User control seems to work fine on all pages unless a search web part is inserted into the page.
The control has a DropDownList that according to user choice hides or shows different panels.
There are also buttons that cause async postbacks within each of the panels.
When a "Search Core Results" webpart is inserted into a page, all async requests cause a javascript error and no updates occur in the update panel.
The javascipt error is:
Sys.WebForms.PageRequestManagerServerErrorException:
Object reference not set to an
instance of an object.
The problem is I can't even figure out what this object is. It seems to be the ScriptManager (although its there in the master page).
Is there a way to get a detailed description of this error?
Also, are there are any known conflicts or issues with update panels and SharePoint search web parts?
I'm relatively new to SharePoint development and am still trying to find my way around customizing and debugging.
Update:
I used fiddler to examine the requests and responses.
In the request, the only difference I see is that without the search webpart it contains an NTLM authorization header, while the request on the page with the webpart has no authorization header.
In the response, the page that works has a private cache-control with some cookies set (i guess for authentication), while the other no-cache nor cookies set. Also, the response text contains the updated control when it works, while the other page returns this:
53|error|500|Object reference not set to an instance of an object.|
Could authorization be the issue here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否使用可见属性来隐藏 DropDownList 控件
如果没有,请使用可见属性
you are used visible property for hide DropDownList control or not
If not then please used visible property for