Vulnerability in EPiServer.Forms
Just added PDF preview package, changed PDF model to
public class PDFFile : MediaData, IPdfFile
but get the following error on start up
[InvalidOperationException: There is already a content type registered with name: PdfFile]
EPiServer.DataAbstraction.Internal.DefaultContentTypeRepository.ValidateUniqueness(ContentType contentType) +222
EPiServer.DataAbstraction.Internal.DefaultContentTypeRepository.Save(ContentType contentType) +111
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeSynchronizer.CreateType(ContentTypeModel contentModel) +136
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.CommitTypes(Boolean deleteUnusedTypes) +328
EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean commitChanges) +224
EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context) +390
EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +52
EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +80
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +179Anyone else got ideas or resolved this problem before?Thanks
You could delete the old pagetype, or rename your new pagetype.
Yep PdfFile model is in there, I can't delete it as it has about 1500 content records associated with it
Tried renaming the model to PdfFileLibrary but that didn't make any difference, think the initialisation for the PDF Previewer is running first
What I don't understand is that according to the documentation for PDF Preview if there is an existing type already then the resolver should use the existing and not try add it's own one.
My PDF model isn't just a placeholder, it has quite a few properties plus it's used in the Find initialastion as it has some custom indexing, categories and a library system built around it.
PDF Preview add on is a nice to have so I don't want to be making major changes to make it work.
I created bug CMS-19157 so it'll be easier to understand why a content type is duplicated