two modules inside one project not working
Hi all, i'm trying to make parent child module (promotion and promotion slide). so i decide to make two module inside one project. the first module (promotion) worked fine.
the problem occurred when the second module is registered. it broke down the backend saying cannot find specified key or class id. it's looks like the previous resource file being override by the new resource file.
it's just a hunch, maybe someone out there can shed me the light where to seek?
here the module project if needed. dl.dropbox.com/.../Module.zip
Thank you
Augus
Hello Augus,
We tried to run your modules on the latest release of sitefintiy 4.1 SP1. The bigget problem seem to be that both modules tried to install a group page with the same Url, once we fixed this - they were installing ok and the backend was working ok. There was also a problem that one of the workflows was not embeded resoruce -so we couldn't create a new slides item. I am attaching the module with the changes.
I am curious why is the need to to create 2 modules instead of one. With one module you can still have 2 menu items and 2 workflows, 2 providers etc. 2 Modules only make sense if people don't need to install or use on of them in certain occasions - is this really the case?
Also if you don't need to have some customzied workflow - you don't need to create and embed new worfklow files. You can relate to the default AnyContent workflow.
Greetings,
Nikolay Datchev
the Telerik team
Thanks for the reply Nikolay. i will try it. well my reason i create two module is because i don't have a clue what is the best practice. i'm really a newbie with sitefinity. Really appreciate for the help :).
another question, if im continue with this module, can i implement the IHasParent and IHasContentChild to the promotion and promotionChild?
Edit:
i'm using the module you supplied and i got this error after adding reference to the module
Stack Trace:[InvalidCastException: Unable to cast object of type 'Factory' to type 'OpenAccessRuntime.Relational.RelationalKeyGeneratorFactory'.] OpenAccessRuntime.Relational.RelationalKeyGeneratorFactoryRegistry.getFactory(String name) +271[OpenAccessException: Unable to create RelationalKeyGeneratorFactory instance OpenAccessRuntime.Relational.sql.HighLowRelationalKeyGenerator+Factory] DynamicModule.ns.Wrapped_OpenAccessMetaDataProvider_73c05231692646a6aff96d0f0c3cebb2.Initialize(String providerName, NameValueCollection config, Type managerType) +283 Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +2706 Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +117 Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +407 Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +249 Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName) +38 Telerik.Sitefinity.Data.Metadata.MetadataManager..ctor(String providerName) +36 BuildUp_Telerik.Sitefinity.Data.Metadata.MetadataManager(IBuilderContext ) +273 Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +42 Telerik.Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +309 Telerik.Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +262 Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +377[ResolutionFailedException: Resolution of the dependency failed, type = "Telerik.Sitefinity.Data.Metadata.MetadataManager", name = "OpenAccessDataProvider".Exception occurred while: Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName).Exception is: OpenAccessException - Unable to create RelationalKeyGeneratorFactory instance OpenAccessRuntime.Relational.sql.HighLowRelationalKeyGenerator+Factory-----------------------------------------------At the time of the exception, the container was: Resolving Telerik.Sitefinity.Data.Metadata.MetadataManager,OpenAccessDataProvider Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName)] DynamicModule.ns.Wrapped_OpenAccessUserActivityProvider_a3a854d7d5e144a1a5b6cdd1c82e12ee.Initialize(String providerName, NameValueCollection config, Type managerType) +281 Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +2706 Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +117 Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +407 Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +249 Telerik.Sitefinity.Data.ManagerBase`1..ctor() +37 Telerik.Sitefinity.Security.UserActivityManager..ctor() +28[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241 System.Activator.CreateInstance() +103 Telerik.Sitefinity.Data.ManagerBase`1.GetManager(String providerName, String transactionName) +123 Telerik.Sitefinity.Data.ManagerBase`1.GetManager() +72 Telerik.Sitefinity.Security.UserActivityManager.GetManager() +27 Telerik.Sitefinity.Security.SecurityManager.AuthenticateRequest(HttpContextBase context) +1614 Telerik.Sitefinity.Web.SitefinityHttpModule.Context_AuthenticateRequest(Object sender, EventArgs e) +53 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75Hi Augus,
It sounds like you added something new to your module mappings that causes this error, i got to admit i haven't seen it until now. Can we have your latest project code again?
Greetings,
Nikolay Datchev
the Telerik team
Hi Nikolay,
after i'm upgrade to 4.1 SP1 SDK the error is gone now and i can't replicate it. so it doesn't matter now.
Thank you for your help :)
Augus