Sitecore:找不到所请求文档的布局
Sitecore: The layout for the requested document was not found
只有当我从内容编辑器中预览项目时,我才会收到错误消息
The layout for the requested document
was not found.
我被重定向到
http:///?item=%2f&layout=%7b00000000-0000-0000-0000-000000000000%7d&device=默认
但是,如果我使用 url 并直接输入或像
那样剪切和粘贴
http:///?sc_itemid=%7BDA4BABB2-2605-46C5-8BA6-52215A826154%7D&sc_mode=预览&sc_lang=en
预览作品。
如果我加载以前的备份它工作,我试图找出两个数据库之间的区别。
关于去哪里看的任何想法。
更新
我正在使用 Sitecore.NET 7.5(修订版 150212)
问题似乎出在 Master 数据库上,因为我可以将当前的 Core 和 Web 数据库与以前的 Master 数据库一起使用并且它可以工作
日志显示
8360 07:23:12 WARN Could not find type in ReflectionUtil.CreateObject: Sitecore.Shell.Applications.Analytics.VisitorIdentifications.RunVisitorIdentifications
8360 07:23:12 ERROR Could not instantiate "Sitecore.Shell.Applications.Analytics.VisitorIdentifications.RunVisitorIdentifications,Sitecore.Client" command object.
8360 07:23:12 WARN Could not find type in ReflectionUtil.CreateObject: Sitecore.Shell.Applications.Analytics.Reports.Summary.Update
8360 07:23:12 ERROR Could not instantiate "Sitecore.Shell.Applications.Analytics.Reports.Summary.Update,Sitecore.Client" command object.
1932 07:23:17 INFO Cache created: 'WebUtil.QueryStringCache' (max size: 19KB, running total: 807MB)
9780 07:23:24 INFO HttpModule is being initialized
12800 07:23:24 INFO HttpModule is being initialized
6248 07:23:25 INFO HttpModule is being initialized
13332 07:23:46 ERROR Item could not be found from query string. [ID is "{DA4BABB2-2605-46C5-8BA6-52215A826154}".]
如果您只关闭了数据库,则意味着 Sitecore 需要您的解决方案中不存在的文件。
检查内容编辑器中布局定义的布局路径,确保引用的布局实际存在。
我还会检查所有内容是否已正确发布到网络数据库,因为您可能看不到全貌。
另请提供日志文件中的任何错误消息。
如果这些选项中的 none 发生任何变化,那么它表明预览存在问题,这可能意味着站点节点在 Web.config
中未正确配置
感谢大家的帮助,但对于这个特定问题,这是解决方法
节选
The config entry for the url being browsed had the attribute domain="extranet" in it. Reading around on the internet, when you click the Preview button, Sitecore tries to load the item you selected using the “\anonymous” account – where is the value of the domain attribute from your configuration.
So in this case, Sitecore was trying to run the preview as “extranet\anonymous” – which is exactly the security right that we have denied by clicking “Require Login”:
So the log error really means “I can’t load that item because access is denied”. For reasons best known to themselves, the developers who wrote this bit of code seem to have decided that if you can’t load an item you should fall back to the homepage item instead of warning the user what’s happened.
Changing the domain attribute’s value to the correct “sitecore” security domain (the one which editorial accounts live in) fixes the issue.
我遇到了类似的问题,我的网站在我的内容管理服务器上正确显示,但在内容交付服务器上出现了同样的布局错误。正如 Ian Graham 指出的那样,您需要确保发布您的网站。
当我查看网络数据库时,我的网站没有引用我的任何布局模板。在我的核心数据库上发布后,问题就解决了。
只有当我从内容编辑器中预览项目时,我才会收到错误消息
The layout for the requested document was not found.
我被重定向到
http:///?item=%2f&layout=%7b00000000-0000-0000-0000-000000000000%7d&device=默认
但是,如果我使用 url 并直接输入或像
那样剪切和粘贴http:///?sc_itemid=%7BDA4BABB2-2605-46C5-8BA6-52215A826154%7D&sc_mode=预览&sc_lang=en
预览作品。
如果我加载以前的备份它工作,我试图找出两个数据库之间的区别。
关于去哪里看的任何想法。
更新 我正在使用 Sitecore.NET 7.5(修订版 150212)
问题似乎出在 Master 数据库上,因为我可以将当前的 Core 和 Web 数据库与以前的 Master 数据库一起使用并且它可以工作
日志显示
8360 07:23:12 WARN Could not find type in ReflectionUtil.CreateObject: Sitecore.Shell.Applications.Analytics.VisitorIdentifications.RunVisitorIdentifications
8360 07:23:12 ERROR Could not instantiate "Sitecore.Shell.Applications.Analytics.VisitorIdentifications.RunVisitorIdentifications,Sitecore.Client" command object.
8360 07:23:12 WARN Could not find type in ReflectionUtil.CreateObject: Sitecore.Shell.Applications.Analytics.Reports.Summary.Update
8360 07:23:12 ERROR Could not instantiate "Sitecore.Shell.Applications.Analytics.Reports.Summary.Update,Sitecore.Client" command object.
1932 07:23:17 INFO Cache created: 'WebUtil.QueryStringCache' (max size: 19KB, running total: 807MB)
9780 07:23:24 INFO HttpModule is being initialized
12800 07:23:24 INFO HttpModule is being initialized
6248 07:23:25 INFO HttpModule is being initialized
13332 07:23:46 ERROR Item could not be found from query string. [ID is "{DA4BABB2-2605-46C5-8BA6-52215A826154}".]
如果您只关闭了数据库,则意味着 Sitecore 需要您的解决方案中不存在的文件。
检查内容编辑器中布局定义的布局路径,确保引用的布局实际存在。
我还会检查所有内容是否已正确发布到网络数据库,因为您可能看不到全貌。
另请提供日志文件中的任何错误消息。
如果这些选项中的 none 发生任何变化,那么它表明预览存在问题,这可能意味着站点节点在 Web.config
中未正确配置感谢大家的帮助,但对于这个特定问题,这是解决方法
节选
The config entry for the url being browsed had the attribute domain="extranet" in it. Reading around on the internet, when you click the Preview button, Sitecore tries to load the item you selected using the “\anonymous” account – where is the value of the domain attribute from your configuration.
So in this case, Sitecore was trying to run the preview as “extranet\anonymous” – which is exactly the security right that we have denied by clicking “Require Login”:
So the log error really means “I can’t load that item because access is denied”. For reasons best known to themselves, the developers who wrote this bit of code seem to have decided that if you can’t load an item you should fall back to the homepage item instead of warning the user what’s happened.
Changing the domain attribute’s value to the correct “sitecore” security domain (the one which editorial accounts live in) fixes the issue.
我遇到了类似的问题,我的网站在我的内容管理服务器上正确显示,但在内容交付服务器上出现了同样的布局错误。正如 Ian Graham 指出的那样,您需要确保发布您的网站。
当我查看网络数据库时,我的网站没有引用我的任何布局模板。在我的核心数据库上发布后,问题就解决了。