重复的控件 ID 导致异常
我最近向我们的生产网站发布了一些代码,我注意到 IIS 正在记录一些错误,异常文本如下:
找到多个具有相同 ID“_ffffca417ddfd512”的控件。 FindControl 要求控件具有唯一的 ID。
我目前没有堆栈跟踪。该页面主要是静态内容,带有一些链接按钮和一堆用户控件。它还使用 Sitecore 6.0 CMS 框架(它是一个内容项)。我禁用了用户控件和页面(布局)的 .net 缓存,这似乎已经修复了它,但该网站非常繁忙,我希望有一些缓存层。
我的问题是这是 sitecore 中的一个已知问题吗?而且,我应该只在页面级别缓存还是在 sitecore 的控制级别缓存?
I recently released some code to our production website and I noticed that IIS was logging some errors with the exception text of:
Multiple controls with the same ID '_ffffca417ddfd512' were found. FindControl requires that controls have unique IDs.
I don't have a stacktrace at this point. The page is mostly static content with a few link buttons and a bunch of user controls. Its also using the Sitecore 6.0 CMS framework (its a content item). I disabled the .net caching for the user controls and the page (layout) and that seems to have fixed it, but the site is pretty busy, and I would like to have some layer of caching.
My question is this a know issue in sitecore? And, should I only cache at the page level or the control level in sitecore?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这似乎不是 Sitecore 特定问题 - http://support.microsoft.com/kb/834608
如果您正在使用它,请关闭 ASP.net 输出缓存并使用 Sitecore 缓存,可以内联:
...或...
...或者在您的演示绑定中模板或项目级别,或者在子布局或渲染定义项上。所有三个位置都提供相同的缓存选项。
This doesn't seem to be a Sitecore specific issue - http://support.microsoft.com/kb/834608
If you're using it, turn off ASP.net output caching and use Sitecore caching, either inline:
...or...
...or in your presentation bindings at the template or item level, or on the sublayout or rendering definition item. The same caching options are available in all three locations.
在子布局(控制)级别进行缓存,因为它们可以跨页面重用。假设您尽可能多地利用子布局,这应该可以满足动态数据的缓存需求。
Cache at the sublayout (control) level as they can be reused across pages. That should satisfy the caching needs for the dynamic data assuming you leverage sublayouts as much as possible.
从 Sitecore 电子商务安装指南(Sitecore 电子商务服务 2.1 和 CMS 7.0 修订版:2013-10-17 第 12 页)中找到此内容
希望这对某人有帮助
Found this from Sitecore E-Commerce Installation Guide (Sitecore E-Commerce Services 2.1and CMS 7.0 Rev:2013-10-17 page 12 )
hope this helps somebody