This project is read-only.

Core Recipe - Blog Post Not 'Draftable' (Publish Now Missing)

Topics: Core, Customizing Orchard, Installing Orchard, Troubleshooting
Nov 14, 2011 at 2:32 AM

Okay, so I've been planning to get real serious in Orchard here so I'm playing with the recipes.  I've installed the "Core" in hopes of building the minimum I needed for a basic site.  I learned that I turned on almost all the features of the "default" recipe however I've found one major issue.

My default installs have a "Publish Now" button for blogposts and my Core recipe does not.  I found this which helped guide me to the problem (but not the solution):

So I've found that the difference is that the "Publish Now" button only shows up if the ContentType is Draftable.  Digging some more I found this:

Core Recipe:

      <Page ContentTypeSettings.Draftable="True" />    
      <BodyPart BodyPartSettings.FlavorDefault="html" />
Default Recipe:
      <Page ContentTypeSettings.Draftable="True" TypeIndexing.Included="true">
        <TagsPart />
        <LocalizationPart />
      <BlogPost ContentTypeSettings.Draftable="True" TypeIndexing.Included="true">
        <CommentsPart />
        <TagsPart />
        <LocalizationPart />
      <BodyPart BodyPartSettings.FlavorDefault="html" />
Now, how exactly to fix this post "cooking" is something I'm just not familiar with. Hoping some one can help me out.


Nov 14, 2011 at 3:21 AM

Self Solved but there is got to be a better way.  I enabled the Import/Export on a site with the Drafting Content Setting and sure enough I found the "feature" I needed:

-<BlogPost DisplayName="Blog Post" TypeIndexing.Included="true" ContentTypeSettings.Draftable="True">

But the site also had a lot of other missing features from my Core Recipe site.  I simply exported from my site, edited the xml and included the tags above and reimported.

it worked! Publish Now is available!

Now, please let me know figure out what the "proper way" of doing this....


Nov 15, 2011 at 2:06 AM

What are the exact steps that you followed? When you enabled Blogs, didn't it create the content types correctly?

Nov 15, 2011 at 2:25 AM
Edited Nov 15, 2011 at 2:26 AM

Thanks for the reply but I'm not sure I understand your question.  

I created a blog using the "Core Recipe".

I enabled the Blog Module after that.

New Blog posts didn't have "Publish Now" and through investigation I determined it was because the BlogPost type did not have the "Draftable="True" addtribute.

I found no way from within the UI to set this (why is there not a way to do this?)

To solve it, I creatively exported BlogPost contenttype from another instance that had been created with the "default recipe" which apparently has the XML within the recipe to make BlogPost a Draftable content type.  I then imported that into my instance which then set the Draftable flag in my "Core Recipe" creatd instance.

If there is a defect  it would be that enabling "Blog" module from the admin page of  "Core Recipe Install" doesn't appear to be setting "Draftable" on BlogPost content Types.

Within the ui, I would like to be able to set the Draftable and other flags regardless of what the default is.  I should be able to switch this on the fly and not have to rely on an import and export process or the default to set these flags.


Is this stored in the database somewhere?  If so, perhaps a module to be able to manage metadata on contentTypes is the appropriate answer.


Thanks for the assistance.

Nov 15, 2011 at 2:27 AM

Please file a bug in the issue tracker with these repro steps.

Nov 15, 2011 at 2:44 AM

I have opened a work item and included the workaround:

Feb 17, 2012 at 3:52 PM
Edited Feb 17, 2012 at 3:52 PM

Using release 1.3.10 I used the following statement in my Migrations.cs


		public int Create() {		
				cfg => cfg

			return 1;

Note that I had to add the Draftable to the code in the initial Create method. Adding it in an upgrade method did not work for me. When I dived into the database I saw a difference between the two approaches:

When you do the code above you'll get this in the Settings_ContentTypeDefinitionRecord table


<settings ContentTypeSettings.Creatable="True" ContentTypeSettings.Draftable="True" />


Let's say you forgot the Draftable() Type Setting and add it in an upgrade method then the table will contain two recors with

record1: <settings ContentTypeSettings.Creatable="True" />
record2: <settings ContentTypeSettings.Draftable="True" />

This seems similar for a human, but not for Orchard (yet :D)

Perhaps a design issue or maybe just a bug.

Feb 17, 2012 at 6:29 PM

Please open a bug for this, or enhance an existing one.


Feb 17, 2012 at 6:43 PM
Edited Feb 17, 2012 at 6:43 PM
sebastienros wrote:

Please open a bug for this, or enhance an existing one.


Added workitem 188444 (where I linked the workitem 18233 from corecomps)