我在.NET 4.6上运行Sitecore 8(Update 5),并且遇到了Bundles返回404错误的问题.
我的布局视图:
@using Sitecore.Mvc.Presentation
@using Sitecore.Mvc
@model RenderingModel
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>@Model.Item.Fields["Title"]</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<h1>@Html.Sitecore().Field("Title")</h1>
@Html.Sitecore().Placeholder("content")
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js" type="text/javascript" defer="defer"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
@Scripts.RenderFormat("<script type=\"text/javascript\" src=\"{0}\" defer=\"defer\"></script>", "~/bundles/scripts/footer")
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我的/Global.asax.cs文件:
using System.Web.Mvc;
using System.Web.Optimization;
using Glass.Mapper.Sc;
namespace Sitecore.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
protected void Application_BeginRequest()
{
Sitecore.Context.Items["Disable"] = new VersionCountDisabler();
} …
Run Code Online (Sandbox Code Playgroud) 我想调试Sitecore代码就像asp.net代码,但不知道如何.
解决方案在wwwroot之外.使用Visual Studio 2013,IIS 10.0,Windows 10,Sitecore 8
附加一个进程,是我需要做的就是能够调试.
在Visual Studio中,当我单击工具>附加进程时,没有aspnet_wp.exe或w3wp.exe.
还有其他流程要遵循.
我有一个使用此方法的sitecore应用程序:
@Html.Sitecore().ViewRendering("Path to the View")
@Html.Sitecore().Controller("Controller Name", "Controller Action")
Run Code Online (Sandbox Code Playgroud)
即使我没有在Sitecore CMS中为该渲染创建项目,这也完美无缺
那么该方法与简单的ASP MVC方法有什么区别:
@Html.Partial("Path to the View")
@Html.Action("Controller Name", "Controller Action")
Run Code Online (Sandbox Code Playgroud)
两者相同与否?我觉得这里有点困惑
考虑模板:
公司
该Company
模板有两个字段设置的标准值.如果我们获取一个Company
项目并使用Glass保存它而不进行任何更改,则该Logo
字段不再使用标准值.(该Company Name
领域未受影响.)
似乎问题是,该Glass.Mapper.Sc.DataMappers.SitecoreFieldImageMapper
字段的值序列化与Sitecore不同.当它试图保存时,它认为这是对字段的更改,不再使用标准值.
标准值:
<image mediaid="{GUID}" />
Run Code Online (Sandbox Code Playgroud)
玻璃生成的价值:
<image height="64" width="64" mediaid="{GUID}" alt="Alt text" />
Run Code Online (Sandbox Code Playgroud)
有没有办法让Glass生成与Sitecore相同的输出?
我有sitecore pages/lucene文档,包含以下字段:
我正在创建搜索这些并具有以下要求:
这是我得到的:
public static Expression<Func<T, bool>> GetSearchTermPredicate<T>(string searchTerm)
where T : ISearchableItem
{
var actualPhrasePredicate = PredicateBuilder.True<T>()
.Or(r => r.Title.Contains(searchTerm).Boost(2f))
.Or(r => r.FileName.Contains(searchTerm).Boost(1.5f))
.Or(r => r.Content.Contains(searchTerm))
.Or(r => r.DocumentContents.Contains(searchTerm));
var individualWordsPredicate = PredicateBuilder.False<T>();
foreach …
Run Code Online (Sandbox Code Playgroud) 我尝试在Sitecore 8.2更新4中安装Sitecore体验加速器和Ucommerce,但我收到以下错误.
我在安装的最后一个软件包上收到错误.无论是ucommerce还是Sitecore Experience Accelerator.
有没有人尝试过使用UCommerce的Sitecore Experience Accelerator(SXA)?
以下详细信息是我使用的sitecore包:
Sitecore 8.2更新4或Sitecore 8.2更新3
Sitecore Experience Accelerator 1.0到1.4
最新版本的ucommerce-for-sitecore-7.7.1.17180
Sitecore电源Shell 4.6
我正在尝试安装Sitecore 8.我收到一条错误消息"不支持SQL Server版本 - SQLServer(10.50.1600.1)"我试图找到安装文档以了解数据库要求.我找不到任何地方,可能是我在错误的地方找.
有人可以指出我正确的方向.
我有一个小问题,有疑问.我创建了一个页面,其中有三个组件添加在三个不同的占位符中.此页面是为英文版本创建的.我需要这个页面和组件,以便在页面的德语版本中添加.
我阅读了一些文章,说明了Sitecore 8的布局增量和"最终布局"功能的使用,但对此问题有点困惑.
另外,我检查了/ sitecore/templates/System/Templates/Sections/Layout中的__Renderings设置,并检查了Shared字段.布局仍然没有共享.
我错过了任何设置吗?我是否每次都需要创建两个版本,即重复德语版本的布局步骤?
欢迎所有建议.
我有一个渲染组件,使用Lucene索引运行搜索以填充自己.
我们定义了两个索引; 硕士和网络.在体验编辑器中,它使用主索引和实际站点的Web索引.
我们已将Web索引策略配置为onPublishEndAsync
,并且我们已将主索引策略配置为syncMaster
,CMS用户可以添加/编辑为此组件提供支持的Sitecore项目,并在体验编辑器中立即查看它们.
但是,当我们更改Sitecore中的数据时,似乎没有更新主索引.体验编辑器仅在我手动运行索引重建后才显示数据.
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
</strategies>
Run Code Online (Sandbox Code Playgroud)
为什么索引在数据更改时不会更新?
UPDATE
所以我将建议的文件与干净安装进行了比较,它们是相同的.
我应该补充一点,我没有使用标准sitecore_master_index
.我们有多个站点在sitecore的同一个实例上运行,因此我们添加了一个config include for websitename_master_index
.我已将<index>
节点内的配置与sitecore_master_index
in in Sitecore.ContentSearch.Lucene.Index.Master.config
进行了比较,唯一的区别是<root>
指向特定网站内容节点的爬虫元素,另外我们添加了一些自定义字段,但我认为这些字段不会导致问题我们可以手动重建索引吗?
我在看到showconfig.aspx
这个时发现的另一个有趣的事情是:
<agent type="Sitecore.ContentSearch.Tasks.Optimize" method="Run" interval="12:00:00" patch:source="Sitecore.ContentSearch.config">
<indexes hint="list">
<index>sitecore_master_index</index>
</indexes>
</agent>
Run Code Online (Sandbox Code Playgroud)
我不确定这是否有任何意义,但我们的定制没有匹配的条目websitename_master_index
?
UPDATE
我还将调试级别日志记录添加到了爬网程序
在crawling.log中我只看到以下内容:
14416 08:55:10 INFO [Index=website_master_index] Initializing SitecoreItemCrawler. DB:master / Root:/sitecore/Content/Website/Home
14416 08:55:10 INFO [Index=website_master_index] Initializing SynchronousStrategy.
Run Code Online (Sandbox Code Playgroud)
在编辑和保存项目时,日志中没有进一步提及索引,这实际上是sitecore_master_index
我们没有更改配置的标准吗?
我知道可以从代码级别发布项目Sitecore.Publishing.PublishManager
.我没有看到取消发布项目的选项.
有可能吗?
sitecore ×10
sitecore8 ×10
lucene ×2
lucene.net ×2
asp.net ×1
asp.net-mvc ×1
c# ×1
glass-mapper ×1
installation ×1
layout ×1
publish ×1
sitecore-mvc ×1
sitecore8.1 ×1