Content type

Topics: Customizing Orchard
Dec 17, 2011 at 8:14 AM

Hi,

I have removed article content type from content->contnetype

I have reinstall my module but content type didnt come again, How can i take content type again

 

lakmal

 

Coordinator
Dec 19, 2011 at 2:08 AM

You'll probably have to recreate it manually. The problem here is probably that the content type was created as part of a migration that is before the current migration counter for that feature. Another possibility would be to add a new migration step, if that is your own module.

Dec 19, 2011 at 2:29 AM

Thats my own module, I have created update form like below

public int UpdateFrom10()
        {
            ContentDefinitionManager.AlterTypeDefinition("Articles",
            cfg => cfg              
                .WithPart("RoutePart")
                .WithPart("BodyPart")
                .WithPart("ArticlesPart")
                .WithPart("PublishLaterPart")
                .WithPart("UserViewPart")               
               
            );
            return 11;
        }

But it didnt create content type again

Coordinator
Dec 19, 2011 at 2:32 AM

And that's a new migration that has never been run before? That is odd and could be a bug.

Dec 19, 2011 at 3:40 AM

I have created migration2.cs, then its work