More in this section

Forums / Developing with Sitefinity / Installing Products Module

Installing Products Module

10 posts, 0 answered
  1. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    16 May 2011
    Link to this post
    I'm using SF4.1 an tried to install the Products module. I've done everything based on the tutorial but after restating the app I got this error:

    No metadata has been registered for class ProductCatalogSample.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///{MyProject}/bin/ProductCatalogSample.DLL.)


     No metadata has been registered for class ProductCatalogSample.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///{My Path}/bin/ProductCatalogSample.DLL.)]
       DynamicModule.ns.Wrapped_OpenAccessRoleProvider_d131be7a64d440de95d2eadb053d4ad4.GetRolesForUser(Guid userId) +405
       Telerik.Sitefinity.Security.SitefinityPrincipal.Initialize() +1006
       Telerik.Sitefinity.Security.SitefinityPrincipal.get_Roles() +16
       Telerik.Sitefinity.Configuration.RolePolicyHandler.GetPolicyNames(ConfigProvider configProvider, ConfigSection section) +62
       Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object& value) +159
       Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& value) +102
       Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop, ConfigPolicyHandler policyHandler, String policyName) +42
       Telerik.Sitefinity.Configuration.ConfigElement.get_Item(String propertyName) +56
       Telerik.Sitefinity.Security.Configuration.SecurityConfig.get_ApplicationRoles() +28
       Telerik.Sitefinity.Security.SitefinityPrincipal.get_IsBackendUser() +86
       Telerik.Sitefinity.Security.SecurityManager.AuthenticateRequest(HttpContextBase context) +1062
       Telerik.Sitefinity.Web.SitefinityHttpModule.Context_AuthenticateRequest(Object sender, EventArgs e) +104
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +256

    Please tell me if is something I should do.

    Thank you!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 May 2011
    Link to this post

    It looks like the module has not been enhanced. The error you get indicated that you have a class that is not mapped in the OpenAccess metadata. There can be various reasons for this. If you have an Open Access provider that is used to manipulate this persistent type it should declare the assembly where this persistent class is located, this happens in the GetPersistentAssemblies method of the provider. Also is the class marked as persistent with the Persistent attribute?
    Hello FlR,


    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. FlR
    FlR avatar
    49 posts
    Registered:
    05 Oct 2010
    16 May 2011
    Link to this post
    The class has the persisten attribute:
    [DataContract(Namespace = "http://sitefinity.com/samples/productcatalogue", Name = "ProductItem")]
        [ManagerType("ProductCatalogSample.Data.ProductsManager, ProductCatalogSample")]
        [Persistent(IdentityField = "contentId")]
        public class ProductItem : Content, IApprovalWorkflowItem, ISecuredObject, ILocatable, ISitefinityCustomTypeSerialization

    About the provider, I'm not sure. In order to install the products module I've folllowed the next steps
    1. Create with SF Project Manager an application
    2. Added the Products sample to the solution
    3. Recompile everything
    4. Moving the dlls of Products sample to website bin
    5. Installing the module using SF Admin interface

    Shouldn't the system made behind all the necessary updates to make the Products module working?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 May 2011
    Link to this post
    Hello FlR,

    Have you enhanced the custom module?

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Anton Mernov
    Anton Mernov avatar
    110 posts
    Registered:
    03 Dec 2008
    18 May 2011
    Link to this post
    Hi Ivan,

    I have the same issue for my custom module after upgrading from SF 4.1 on SF 4.1 SP1.
    In the *.csproj file I have the following declaration for OA enhancement:

    <ProjectExtensions>
      <VisualStudio>
        <UserProperties OpenAccess_EnhancementOutputLevel="1" OpenAccess_UpdateDatabase="False" OpenAccess_Enhancing="False" OpenAccess_ConnectionId="DatabaseConnection1" OpenAccess_ConfigFile="App.config" />
      </VisualStudio>
    </ProjectExtensions>
    <PropertyGroup>
      <OpenAccessPath>c:\Program Files\Telerik\Sitefinity 4.1\SDK\Content\Common\Dependencies\</OpenAccessPath>
    </PropertyGroup>
    <Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')" Project="$(OpenAccessPath)\OpenAccess.targets" />

    But I still get the error:

    No metadata has been registered for class ....


    Any suggestions?

    BTW, where can I find whether an assembly was enhanced?

    Thanks in advance,
    Anton.
  6. Anton Mernov
    Anton Mernov avatar
    110 posts
    Registered:
    03 Dec 2008
    18 May 2011
    Link to this post
    Some additional information.
    I just noticed in the output tab in VS the warning message from OA enhancer:

    MSBUILD : OpenAccess Enhancer warning : No persistent classes found. Is the metadata information missing?

    What does it mean? I have never seen this message after compilation my module in SF 4.1.
    My custom classes were not changed after upgrading from 4.1 to 4.1 SP1.

    Best regards,
    Anton

     
  7. Helga
    Helga avatar
    6 posts
    Registered:
    05 Apr 2011
    18 May 2011
    Link to this post
    I get this error, too. The class is marked as persisten.

    No metadata has been registered for class ProductCatalog.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Program Files/Telerik/Sitefinity 4.1/Projects/pssite/bin/ProductCatalog.DLL.)


    Stack Trace: 

    [OpenAccessException: No metadata has been registered for class ProductCatalog.Model.ProductItem. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Program Files/Telerik/Sitefinity 4.1/Projects/pssite/bin/ProductCatalog.DLL.)]
       DynamicModule.ns.Wrapped_OpenAccessRoleProvider_975c8a0a334c43b7a81f0a078afb63cf.GetRolesForUser(Guid userId) +230
       Telerik.Sitefinity.Security.SitefinityPrincipal.Initialize() +1036
       Telerik.Sitefinity.Security.SitefinityPrincipal.get_Roles() +9
       Telerik.Sitefinity.Configuration.RolePolicyHandler.GetPolicyNames(ConfigProvider configProvider, ConfigSection section) +46
       Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object& value) +101
       Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& value) +87
       Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop) +56
       Telerik.Sitefinity.Services.SystemConfig.get_CacheDependencyHandlers() +68
       Telerik.Sitefinity.Data.CacheDependency..cctor() +79
    
    [TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Data.CacheDependency' threw an exception.]
       Telerik.Sitefinity.Data.CacheDependency.Subscribe(Type handlerType, Object trackedItem, ChangedCallback callback) +0
       Telerik.Sitefinity.Configuration.ConfigCacheDependency.Initialize(CacheItem owningCacheItem) +74
       Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.CacheItem.InitializeExpirations() +30
       Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.Cache.Add(String key, Object value, CacheItemPriority scavengingPriority, ICacheItemRefreshAction refreshAction, ICacheItemExpiration[] expirations) +508
       Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager.Add(String key, Object value, CacheItemPriority scavengingPriority, ICacheItemRefreshAction refreshAction, ICacheItemExpiration[] expirations) +28
       Telerik.Sitefinity.Configuration.ConfigSection.HasPolicy(ConfigPolicyHandler policyHandler, String policyName, PolicyStatusInfo& policyStatus) +186
       Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object& value) +182
       Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& value) +87
       Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop) +56
       Telerik.Sitefinity.Configuration.ConfigElement.get_Item(String propertyName) +68
       Telerik.Sitefinity.Security.Configuration.SecurityConfig.get_ApplicationRoles() +17
       Telerik.Sitefinity.Security.SitefinityPrincipal.get_IsBackendUser() +56
       Telerik.Sitefinity.Security.SecurityManager.AuthenticateRequest(HttpContextBase context) +932
       Telerik.Sitefinity.Web.SitefinityHttpModule.Context_AuthenticateRequest(Object sender, EventArgs e) +18
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +168
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76

  8. Rushman
    Rushman avatar
    16 posts
    Registered:
    31 Dec 2008
    18 May 2011
    Link to this post
    Hey Ivan,

    How do you enhance a custom module?

    Thanks,
    Tim
  9. Helga
    Helga avatar
    6 posts
    Registered:
    05 Apr 2011
    19 May 2011
    Link to this post

    http://www.telerik.com/help/openaccess-orm/fluent-mapping-getting-started-fluent-mapping-api.html#Integration_with_OpenAccess_Enhancer
    editing the .csproj file in accordance with instructions solved this problem.

    But I get another error

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

    Stack Trace: 

    [ArgumentException: Could not find the specified key "ProductCommentsPageTitle" 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) +2284
       Telerik.Sitefinity.Web.SiteMapBase.GetChildNodes(SiteMapNode node, Boolean ifAccessible) +471
       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) +3485
  10. George
    George avatar
    28 posts
    Registered:
    24 Sep 2012
    25 May 2011
    Link to this post
    Hi all,

    Tim, you enhance the custom module by modifying the .csproj file, see more details on http://www.sitefinity.com/40/help/developers-guide/how-to-how-to-create-a-custom-content-based-module-preparing-your-working-environment.html in the bottom of the page.

    Helga, can you open ProductsResources.cs and confirm if a resource key ProductCommentsPageTitle exists there? If not, you'll have to add it manually.

    All the best,
    George
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
10 posts, 0 answered