小编Mar*_*lak的帖子

在Sitecore中设置Created By值

我们有什么方法可以从代码中设置Sitecore的Created ByCreated Date项目字段?

谢谢

.net c# sitecore content-management-system

6
推荐指数
1
解决办法
2213
查看次数

如何在Sitecore内容传送服务器上重建自定义Lucene索引?

我的Sitecore 6.2 Content Delivery服务器上的自定义Lucene索引似乎不对.所以我想我需要重建所有3个自定义索引.我怎么做?我只需要使用共享源索引查看器模块吗?现在我已经在我的CD服务器上安装了它,但由于某种原因它无法正常工作.当我在Index Viewer中选择我的自定义索引时 - 没有任何反应.所以我无法以这种方式重建索引.我可以从硬盘驱动器中删除索引文件吗?如果是这样,Lucene将以多快的速度重建它们?

lucene.net sitecore sitecore6

6
推荐指数
1
解决办法
5413
查看次数

Sitecore 7中的奇怪超时

我已经使用Sitecore版本7.1几个月了,并注意到Sitecore客户端在闲置约20分钟后让我退出.其他用户在内容编辑时也报告了这些问题.

我正在使用Windows 7,IIS 7,.NET framework 4.5.

我已经检查了错误日志中的任何内容,并且看不到明显的错误并且keepalive服务正在运行 - 我在日志中获取此信息:

ManagedPoolThread #14 12:47:24 INFO Scheduling.UrlAgent started. Url:http://testsite/sitecore/service/keepalive.aspx
Run Code Online (Sandbox Code Playgroud)

我在日志中得到了一些,但这可能是相关的吗?

WARN  Memory usage exceeded the MemoryMonitor threshold
Run Code Online (Sandbox Code Playgroud)

当我离开它20分钟后回到现场.我在日志中得到这些条目.

952 15:08:28 INFO  AUDIT (sitecore\grahams): Logout
952 15:08:28 WARN  Protected page accessed with no current user
6440 15:08:28 INFO  AUDIT (sitecore\grahams): Logout
6440 15:08:28 WARN  Protected page accessed with no current user
Run Code Online (Sandbox Code Playgroud)

有没有看到过这种情况的身体,或者有任何迹象表明我如何能够达到这个目的?

提前致谢

伊恩

sitecore session-timeout sitecore7 sitecore7.1

6
推荐指数
1
解决办法
5303
查看次数

Sitecore Social Connector 2.1不与Sitecore 7.2一起使用

嗨,当我尝试在sitecore 7.2中安装Social Connected 2.1时,我收到此错误

找不到配置节点:contentSearch/configuration/defaultIndexConfiguration/analyzer

无法找到解决方案.

任何人都可以帮我解决这个问题.

提前致谢!

sitecore sitecore7 sitecore-social-connected sitecore7.2

6
推荐指数
2
解决办法
955
查看次数

Sitecore Glass Mapper始终为null

我正在使用Sitecore Glass Mapper来创建我正在设置的新项目.我们正在使用Sitecore 7.2,最新版本的Team Development for Sitecore(TDS)代码生成和最新版本的玻璃.

我试图执行的代码:

var b = new SitecoreContext();
var c = b.GetCurrentItem<T01_Homepage>();
Run Code Online (Sandbox Code Playgroud)

b不为空.c为空.

var d = b.GetItem<T01_Homepage>("path")
Run Code Online (Sandbox Code Playgroud)

d为空.

我在GlassMapperScCustom中添加了我的程序集:

public static IConfigurationLoader[] GlassLoaders(){            

    var attributes = new AttributeConfigurationLoader(new[] { "Company.Framework.Websites.Corporate", "Company.Framework.Core", "Company.Framework.Common" });

    return new IConfigurationLoader[] { attributes };
}
Run Code Online (Sandbox Code Playgroud)

当我查看b.GlassContext.TypeConfigurations时,我所有的模型都在那里.

我认为它可能是一个语言问题,因为该网站是荷兰语,也许错误的语言将被错误地解决.事实并非如此.

我禁用了WebActivator并在我的Global.asax Application_Start方法中添加了GlassMapperSc.Start().

我们也使用Autofac作为DI框架.但如果没有它,它仍然无法正常工作,如上所述.此外,当我创建自己的自定义模型而没有生成TDS代码时,结果GetCurrentItem<T>为null.

有谁知道如何解决这个问题?

code-generation sitecore tds glass-mapper sitecore7.2

6
推荐指数
1
解决办法
2814
查看次数

Sitecore从媒体库加载XML文件?

我试图从媒体库加载一个xml文件,但我遇到了路径问题.我可以在xml文件位于实际服务器文件中时加载xml,或者当它位于另一个托管站点时加载xml,但是当文件位于媒体库中时则不能加载xml.xml文件是否必须是托管在某处的物理文件?

这是我检索媒体项路径的代码:

Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");
Sitecore.Data.Items.Item sampleItem = master.GetItem("/sitecore/media library/Files/eBooks/testxml");
Sitecore.Data.Items.Item sampleMedia = new Sitecore.Data.Items.MediaItem(sampleItem);
string url = Sitecore.StringUtil.EnsurePrefix('/', Sitecore.Resources.Media.MediaManager.GetMediaUrl(sampleMedia));
Run Code Online (Sandbox Code Playgroud)

然后,当我加载xml时,我正在执行以下操作:

XmlDocument xDoc = new XmlDocument();
xDoc.Load(Server.MapPath(url));
Run Code Online (Sandbox Code Playgroud)

它返回的路径是正确的,因为我已经测试过它将它放在一个锚标签中,看它是否会链接到xml文件,它确实如此.我在这个网站上发现了类似的帖子,但似乎都没有在xml.Load的上下文中处理媒体库项目.

任何关于这是否可能的信息或我可以做些什么来使其工作将非常感激.

谢谢.

c# xml xmldocument sitecore sitecore6

5
推荐指数
2
解决办法
1688
查看次数

Glass with Sitecore中的图像列表

我使用Glass库作为Sitecore的ORM.我有一个包含图像列表的字段图像.由于我想从我的.NET代码访问它,我编写了一个部分类,其中包含以下字段图像:

[SitecoreField]
public virtual IEnumerable<Glass.Sitecore.Mapper.FieldTypes.Image> Images { get; set;}
Run Code Online (Sandbox Code Playgroud)

但是加载这个时我得到了错误.

The method or operation is not implemented.
Run Code Online (Sandbox Code Playgroud)

我可以通过Glass访问单个图像,而无需编写任何其他代码.

任何人都可以建议解决这个问题?

sitecore sitecore6 glass-mapper

5
推荐指数
1
解决办法
1986
查看次数

Sitecore Glass Mapper:接口或具体类的属性?

我们是Glass mapper的新手,想在我们的Sitecore项目中使用它.在查看教程时,我们注意到没有深入的示例说明如何设置Sitecore允许的深度继承.在浏览网页时,我们注意到有人在界面上放置属性,另一方面有人将属性放在具体的类上.这些例子都没有解释他们这样做的充分理由,但却给我们留下了一个问题:哪个是正确的用法,做一个或另一个有什么影响?

考虑以下:

模板:内容(添加2个简单字段的字段部分模板:标题,正文)此模板由我们的许多模板直接和间接继承.

现在在我们的一个子布局中,我们只使用这一部分,它是一种更通用的控制,因此我们需要做:GetCurrentItem<Content>GetCurrentItem<IContent>.

我个人觉得GetCurrentItem<IContent>更直观,因为它感觉问:"如果它支持内容部分给我当前项目",其他人感觉更像"如果它是内容部分,给我当前项目"(从技术上讲,这是不可能的永远不会创建内容项)

sitecore glass-mapper

5
推荐指数
1
解决办法
4473
查看次数

页面预览期间的功能区控制异常

嗨,在预览期间加载页面我没有加载功能区.你有什么线索如何解决它?

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can …
Run Code Online (Sandbox Code Playgroud)

sitecore sitecore6

5
推荐指数
1
解决办法
2223
查看次数

使用Glass Mapper for Sitecore获取内部链接的绝对URL

我的项目模板有一个a字段,General Link由以下类表示:

[SitecoreType]
public class MenuLink
{
    [SitecoreField(FieldName = "Link")]
    public virtual Link Link { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

现在,我的链接字段包含外部和内部链接(指向其他项目的链接).是否可以配置Glass Mapper 包含绝对URL 的Url属性Link(如AlwaysIncludeServerUrl=true)?还有那个用于网站解析(SiteResolving=true)?

基本上我想给Link属性一个UrlOptions配置.

我使用的是Sitecore 7.1Glass.Mapper.Sc 3.1.2.18.

c# sitecore glass-mapper sitecore7.1

5
推荐指数
1
解决办法
9127
查看次数