“无法在Sitefinity中找到指定的密钥”ProductsLandingPageTitle“或类ID”ProductsResources“”

时间:2011-05-20 07:15:45

标签: .net sitefinity-4

我将示例产品模块添加到我的项目中,将其设置为文档中显示,并在重新启动应用程序后获取错误。 从SystemConfig.config中删除注册表字符串不能解决问题。

Could not find the specified key "ProductsLandingPageTitle" or class id "ProductsResources".

堆栈追踪:

[ArgumentException: Could not find the specified key "ProductsLandingPageTitle" or class id "ProductsResources".]
Telerik.Sitefinity.Localization.Resource.GetString(ResourceDataProvider provider, String classId, String key, CultureInfo culture, Boolean falback, Boolean throws) +454
Telerik.Sitefinity.Localization.Res.Get(String classId, String key, CultureInfo culture, Boolean fallback, Boolean throws) +168
Telerik.Sitefinity.Abstractions.AppSettings.GetResourceValue(String resourceClassId, String resourceKey, CultureInfo culture) +125
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetValueFromResource(String value, CultureInfo culture) +121
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.TryGetResourceValue(Object component, String& value, CultureInfo culture) +140
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetValue(Object component, CultureInfo culture, Boolean throwException, CultureInfo[] defaultCultures) +58
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetValue(Object component, CultureInfo culture, Boolean throwException) +71
Telerik.Sitefinity.Descriptors.LstringPropertyDescriptor.GetString(Object component, CultureInfo culture, Boolean fallback) +100
Telerik.Sitefinity.Model.Lstring.GetString(CultureInfo culture, Boolean fallback) +64
Telerik.Sitefinity.Model.Lstring.get_Value() +35
Telerik.Sitefinity.Web.PageSiteNode..ctor(SiteMapBase provider, PageNode pageNode) +2725
Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node, Boolean ifAccessible) +470
Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node) +12
System.Web.SiteMapNode.get_ChildNodes() +30
System.Web.SiteMapNode.get_HasChildNodes() +10
Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node) +30
Telerik.Sitefinity.Web.UI.Backend.MainMenu.<IsNodeEmpty>b__6(PageSiteNode c) +4
System.Linq.WhereArrayIterator`1.MoveNext() +55
System.Linq.Enumerable.Count(IEnumerable`1 source) +200
Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node) +252
Telerik.Sitefinity.Web.UI.Backend.MainMenu.<IsNodeEmpty>b__6(PageSiteNode c) +4
System.Linq.WhereArrayIterator`1.MoveNext() +55
System.Linq.Enumerable.Count(IEnumerable`1 source) +200
Telerik.Sitefinity.Web.UI.Backend.MainMenu.IsNodeEmpty(PageSiteNode node) +252
Telerik.Sitefinity.Web.UI.Backend.MainMenu.CreateRadMenuItemFromNode(SiteMapNode node) +100
Telerik.Sitefinity.Web.UI.Backend.MainMenu.OnLoad(EventArgs e) +408
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +168
System.Web.UI.Control.LoadRecursive() +168
System.Web.UI.Control.LoadRecursive() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3488

什么可能导致这些问题?

谢谢!

3 个答案:

答案 0 :(得分:1)

这与本地化有关。 ProductsResources类是定义这些键的地方,我猜这个键丢失了......

您也可以通过在设置

时删除ResouceClassId属性来简单地禁用本地化

我希望这有用!

答案 1 :(得分:0)

添加此

ResourceClassId=ProductCatalogSample.ProductsResources
注册模块时

答案 2 :(得分:0)

需要添加资源类id,在初始化Resource类之前应该具有类似

的内容

[ObjectInfo("ProductsResources", ResourceClassId = "ProductsResources")]