1
Vote

Execute migration hooks earlier

description

Hi,
 
We had to remove some of the page definitions from the page type. One of the way is to use PTB Migrations approach to hook some executable before sync happens.
We have to delete library that holds type of the page definition from bin/ directory. Deleted property from page type code, deleted .dll file from bin/ directory and added migration code seems doesn't help.
Got an error from DropIt (Composer) which most probably is executed just a little before PTB kicks in.
 
[EPiServerException: Can't load property type 'ImageStoreNET.ImageType, ImageVault.EPiServer6']
EPiServer.Core.PropertyData.CreatePropertyDataObject(String assemblyName, String typeName) +788
EPiServer.DataAbstraction.PageDefinition.CreatePropertyData() +52
EPiServer.Core.PropertyDataCollection.EnsureAllPageTypeProperties() +424
EPiServer.Core.PageData.InitializeData(IList1 pageLanguages) +44
EPiServer.DataAccess.PageListDB.ReadPageList(AbstractCommand cmd) +3397
EPiServer.DataAccess.<>c__DisplayClass14.<LoadSpecificPages>b__13() +663
EPiServer.DataAccess.<>c__DisplayClass1
1.<Execute>b__0() +203
EPiServer.DataAccess.DatabaseFactory.Execute(Action1 method) +74
EPiServer.LocalPageProvider.GetPages(PageReferenceCollection pageReferences, ILanguageSelector selector) +373
EPiServer.Core.PageProviderBase.GetScatteredPages(IList
1 pageRefs, ILanguageSelector selector) +509
EPiServer.Core.PageProviderBase.GetChildren(PageReference pageLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows) +420
EPiServer.DataFactory.GetChildren(PageReference pageLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows) +708
EPiServer.DataFactory.GetChildren(PageReference pageLink, ILanguageSelector selector) +23
EPiServer.Web.UrlSegment.ExistOtherPageWithSegment(PageReference pageLink, PageReference parent, String urlSegment, String languageBranch) +150
EPiServer.Core.PageProviderBase.GetUniqueUrlSegment(PageData changedPage, PageReference destinationLink) +333
EPiServer.DataFactory.Save(PageData page, SaveAction action, AccessLevel access) +627
Dropit.Extension.Controllers.PageDataManager.SaveSpecializedCommonData(PageReference rootLink, SpecializedExtensionCommonData data) +307
Dropit.Extension.Controllers.CategoryManager.Initialize() +542
Dropit.Extension.Common.GlobalSettings.InitializeSettings() +145
Dropit.Extension.Handlers.InitializationModule.InitExtension() +1349
Dropit.Extension.Handlers.InitializationModule.Initialize(InitializationEngine context) +29
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +647
EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +115
EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +199
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +64
EPiServer.Global..ctor() +74
Coop.Web.Global..ctor() +40
ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\72b9ecd8\b66ff91f\App_global.asax.0.cs:0
 
[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) +117
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +247
System.Activator.CreateInstance(Type type, Boolean nonPublic) +106
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +12739533
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +83
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +315
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
 
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700992
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4869221
 
 
Any ideas how to workaround this and execute PTB sync and migrations before Composer module?

comments