problem writing recipe : Could not enable feature refer to the recipe journal

Topics: Installing Orchard
Jul 12, 2011 at 6:47 PM

So I watched a mix video and decided to modify the Blog recipe a little. This is what I did:

 

  <Module packageId="Orchard.Module.Orchard.Messaging" />
  <Module packageId="Orchard.Module.Orchard.Email" />
  <Module packageId="Orchard.Module.Lucene" />
  <Module packageId="Orchard.Module.Orchard.Search" />
  <Module packageId="Orchard.Module.Orchard.Indexing" />
  <Module packageId="Orchard.Module.Orchard.SiteMap" />
  <Module packageId="Orchard.Module.Vandelay.Favicon" />
  <Module packageId="Orchard.Module.Vandelay.TagCloud" />
  <Module packageId="Orchard.Module.Contrib.Voting" />
  <Module packageId="Orchard.Module.Contrib.Stars" />
  <Module packageId="Orchard.Module.SH.GoogleAnalytics" />
  <Module packageId="Orchard.Module.Heikura.SyntaxHighlighter" />
  <Module packageId="Orchard.Module.GooglePlusOne" />
  <Module packageId="Orchard.Module.Szmyd.Orchard.Modules.Sharing" />
                               
  <Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,
                   XmlRpc,Orchard.Blogs.RemotePublishing,
                   TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
                   Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,
                   Orchard.Scripting,Orchard.Scripting.Lightweight,
                   PackagingServices,Orchard.Packaging,Gallery.Updates,Orchard.Warmup,
                   Orchard.Module.Orchard.Messaging,
                   Orchard.Module.Orchard.Email,
                   Orchard.Module.Lucene,
                   Orchard.Module.Orchard.Search,

.....

 

I just end up getting a YSOD For anything extra I added (from the default blog recipe)

I get a message saying:  Could not enable feature xx..Messaging refer to the recipe journal for more information! If I remove messaging the next one fails!?

Whats more annoying is all modules I'll added in here have been downloaded on my modules folder? Its just not getting enabled!!

What am I doing wrong?

Coordinator
Jul 12, 2011 at 7:53 PM

Can you post the error message from the recipe journal, please?

Jul 13, 2011 at 11:59 AM

Will do, I am almost done authoring my site with the default blog recipe. (My first full orchard site! =))

So to repro this I could just backup and delete Sites/Default and try my recipe? And to revert back I would put the Sites/Default back?

I have the latest source listing.

Coordinator
Jul 13, 2011 at 11:34 PM

Yes, that should work.

Aug 1, 2011 at 6:55 AM

Took me sometime to figure where the recipe journal is:

Its under "\Orchard.Web\Media\Default\RecipeJournal"

This is what it says:

<RecipeJournal>
  <Status>Failed</Status>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Module.</Message>
  <Message>Executing step Feature.</Message>
</RecipeJournal>

This is part of the YSOD I get:

Recipe execution with id b42b1919fe634f9990bb985948a0d4ca was cancelled because the "Feature" step failed to execute. The following exception was thrown: Could not enable feature Orchard.Module.Orchard.Messaging because it was not found.. Refer to the recipe journal for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Orchard.OrchardCoreException: Recipe execution with id b42b1919fe634f9990bb985948a0d4ca was cancelled because the "Feature" step failed to execute. The following exception was thrown: Could not enable feature Orchard.Module.Orchard.Messaging because it was not found.. Refer to the recipe journal for more information.

Source Error: 

Line 80:             if (method != null) {
Line 81:                 var parameters = new List<object>();
Line 82:                 foreach (var methodParameter in method.GetParameters()) {
Line 83:                     parameters.Add(arguments[methodParameter.Name]);
Line 84:                 }


Source File:<snip>\src\Orchard\Events\DefaultOrchardEventBus.cs    Line: 82 

 

Coordinator
Aug 2, 2011 at 12:33 AM

Apparently the module that contains the feature you were trying to enable was not installed first.

Aug 2, 2011 at 5:05 AM

Thanks for your reply bertrand,

Not sure what you mean though, I've added 

<Module packageId="Orchard.Module.Orchard.Messaging" /> and then <Feature Enable=".." 

Is there something wrong with the order? If I remove messaging or any of them, I still get a YSOD for the first module in that list? 

And they're all downloaded in the Orchard.Web/Modules folder/
Coordinator
Aug 2, 2011 at 5:48 AM

Yes, that should work. Anything in error logs or recipe logs (found in media)?

Jun 26, 2012 at 4:16 PM

Bertrand and team

Is there a way to have logs in recipes? Also we get a message saying recipe execution scheduled successfully. How do we get a status that the recipe completed successfully?

I know we can see in the recipe journal but is there a command line way of knowing that?

Thanks

Kinjal Shah