“找不到指定的键“ProductsLandingPageTitle”或类 ID“ProductsResources”在 Sitefinity 中
我将示例产品模块添加到我的项目中,将其设置为文档中所示,然后重新启动应用程序后出现错误。 从 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
什么可能导致这些问题?
谢谢你!
I add sample product module to my project, set it as show in documentation, and after restart application get error.
Removing registry string from SystemConfig.config don't solve problem.
Could not find the specified key "ProductsLandingPageTitle" or class id "ProductsResources".
Stack Trace:
[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
What could cause these problems?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这与本地化有关。 ProductsResources 类是定义这些键的地方,我猜测该键丢失了...
您也可以通过在设置时删除 ResouceClassId 属性来简单地禁用本地化,
我希望这会有所帮助!
This is related to localization. The ProductsResources class is where these keys would be defined, and I'm guessing that key is missing...
you can also simply disable localization by removing the ResouceClassId property whenever it's set
I hope this is helpful!
需要添加资源类id,在初始化Resource类之前应该有类似
[ObjectInfo("ProductsResources", ResourceClassId = "ProductsResources")]
Need to add the resource class id, before initializing the Resource class should have something like
[ObjectInfo("ProductsResources", ResourceClassId = "ProductsResources")]
添加此内容
在注册模块时
Add this
while registering the module