Remove a Part from ContentType With SomeSetting

Topics: Administration, Core
Jul 19, 2014 at 12:38 PM
Recently I created a Module with migration enabled and added some types
ContentDefinitionManager.AlterTypeDefinition("TestType", builder =>
            .WithPart("SomePart", partBuilder =>
            partBuilder.WithSetting("BodyTypePartSettings.Flavor", "text")));
        return 1;

after that in second migration method I decided to remove this part but I couldn't.
I tested removepart for other parts and it works fine when we don't set any part settings
What should I do?
Jul 21, 2014 at 8:08 PM
Settings shouldn't affect your ability to remove parts. But what exactly you mean by "remove part"? What did you do, what happened and what did you expect?
Jul 21, 2014 at 9:24 PM
I just added an autoroute part with some json config settings mistakenly ì forget e and it showed up autorout
I tried to remove it but I couldnt do that
After that ì created another part with samename but without any setting and removed
It easily I just want to know if its a bug or anything else.
Jul 21, 2014 at 9:25 PM
So you tried to remove this erroneous part from the admin UI? But it remained there?
Jul 21, 2014 at 9:27 PM
Yes the part with setting still there but the other removed
Jul 21, 2014 at 9:31 PM
I cant remove it from admin UI No remove or delte link shown for this particular part
Jul 21, 2014 at 9:41 PM
OK, no delete link is a different issue. This is just because your content type is not attachable (i.e. it can't be attached from the admin UI). AutoroutePart is, that's why you can remove it.

You can simply set the part to be attachable from under Content Definition/Content Parts/your part.
Jul 21, 2014 at 9:46 PM
Then why it's not deleted with removepart is there any table relation that prevent this or ...?