Sitecore页面预览要求多站点设置中的无效站点(Sitecore Page Preview Asking for non

编程入门 行业动态 更新时间:2024-10-07 20:28:33
Sitecore页面预览要求多站点设置中的无效站点(Sitecore Page Preview Asking for non-valid Site in Multi-Site Setup)

我们在Sitecore 6.5上运行Sitecore多站点设置。 目前,内容编辑器的预览选项卡中的页面预览为我们提供了错误404,因为它传递了无效的url参数。

它试图达到的网址是:

http://preview-site1.com:80/sitecore/content/Home-site1/P/F/BM/WaystoMakeYourPracticeGreen?sc_site=website&sc_lang=en&sc_mode=preview&sc_duration=temporary&sc_device=%7bFE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3%7d

此网址不正确,因为它指定参数sc_site=website 。 我们没有使用名称网站声明的网站元素,除了我们的forms.config(适用于营销人员的WebForms)。 删除此参数或将其转换为sc_site=site1会使路径有效。 如果我从forms.config文件中删除<site name="website">元素,页面预览将使用完全不同的url结构,该结构将返回灰色背景。

如何说服Sitecore页面预览使用正确的URL(或完全省略参数)?

We have a Sitecore multi-site setup running on Sitecore 6.5. Currently, the page preview in the preview tab of the content editor gives us back error 404 because it is passing invalid url parameters.

The url it is attempting to reach is:

http://preview-site1.com:80/sitecore/content/Home-site1/P/F/BM/WaystoMakeYourPracticeGreen?sc_site=website&sc_lang=en&sc_mode=preview&sc_duration=temporary&sc_device=%7bFE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3%7d

This url is incorrect because it specifies the parameter sc_site=website. We do not have a site element declared with the name website except in our forms.config (for WebForms for marketers). Removing this parameter or chaning it to sc_site=site1 makes the path valid. If I remove the <site name="website"> element from our forms.config file, the page preview uses a completely different url structure that returns a grey background.

How do I convince the Sitecore page preview to use the correct url (or omit the parameter altogether)?

最满意答案

您需要登录要预览的URL下的Sitecore创作界面。 它无法确定要预览的上下文站点。 例如site1.com/sitecore/与site2.com/sitecore/

The answer is that the <site /> element with the name website is special in Sitecore and necessary for features to work correctly in a multi-site setup. The website site should be a catch all for the sites running on your Sitecore instance.

EDIT: The page preview engine specifically requests the site website expecting this ( site named website ) to be correctly configured. Sitecore hints at this in their documentation on the SDN but does not mention it explicitly.

更多推荐

url,sc_site,Sitecore,website,参数,电脑培训,计算机培训,IT培训"/> <meta name=&qu

本文发布于:2023-07-19 23:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1188589.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:站点   页面   Sitecore   Page   Preview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!