Rules Not Showing in Admin Menu

Topics: Troubleshooting
Apr 11, 2013 at 3:59 PM
Edited Apr 11, 2013 at 11:32 PM
I started a new site and I am trying to enable rules. I have enabled the Rules feature (dependencies also enabled) but I do not see Rules listed on the left menu. Is there something I am forgetting?
Developer
Apr 13, 2013 at 12:02 AM
Enabling the Rules feature should be enough. Perhaps there's something suspicious in the log files in App_Data?
Apr 15, 2013 at 7:33 PM
Edited Apr 15, 2013 at 7:33 PM
Sorry for late reply, this site is for work and I refuse to work on weekends. :D
2013-04-11 08:40:06,312 [64] Orchard.Recipes.Services.RecipeStepExecutor - Recipe execution 9556619946174145a67103d05c250f3d was cancelled because a step failed to execute
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Orchard.Environment.Features.FeatureManager.<EnableFeature>b__1e(String currentFeatureId, IDictionary`2 featuresState) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\Features\FeatureManager.cs:line 147
   at Orchard.Environment.Features.FeatureManager.GetAffectedFeatures(String featureId, IDictionary`2 features, Func`3 getAffectedDependencies) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\Features\FeatureManager.cs:line 195
   at Orchard.Environment.Features.FeatureManager.EnableFeature(String featureId, IDictionary`2 availableFeatures, Boolean force) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\Features\FeatureManager.cs:line 153
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Environment.Features.FeatureManager.EnableFeatures(IEnumerable`1 featureIds, Boolean force) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Environment\Features\FeatureManager.cs:line 72
   at Orchard.Recipes.RecipeHandlers.FeatureRecipeHandler.ExecuteRecipeStep(RecipeContext recipeContext)
   at Orchard.Recipes.Services.RecipeStepExecutor.ExecuteNextStep(String executionId)
2013-04-11 08:40:06,593 [64] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Orchard.OrchardCoreException: Recipe execution with id 9556619946174145a67103d05c250f3d was cancelled because the "Feature" step failed to execute. The following exception was thrown: Sequence contains no matching element. Refer to the recipe journal for more information.
   at Orchard.Recipes.Services.RecipeStepExecutor.ExecuteNextStep(String executionId)
   at Orchard.Recipes.Services.RecipeScheduler.ExecuteWork(String executionId)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 84
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 73
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, IEnumerable& returnValue) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 52
2013-04-11 09:51:13,100 [18] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - RuntimeBinderException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null]]
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'Orchard.Modules.Models.ModuleEntry' to 'Orchard.ContentManagement.ContentPart'
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at CallSite.Target(Closure , CallSite , Object )
   at Orchard.DesignerTools.Services.WidgetAlternatesFactory.<Displaying>b__5(ShapeDisplayingContext displayedContext)
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Users\sebros\My Projects\Orchard\src\Orchard\InvokeExtensions.cs:line 17
__2013-04-11 09:51:15,226 [18] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - RuntimeBinderException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null]]
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'Orchard.Modules.Models.ModuleEntry' to 'Orchard.ContentManagement.ContentPart'
   at CallSite.Target(Closure , CallSite , Object )
   at Orchard.DesignerTools.Services.WidgetAlternatesFactory.<Displaying>b__5(ShapeDisplayingContext displayedContext)
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Users\sebros\My Projects\Orchard\src\Orchard\InvokeExtensions.cs:line 17__
2013-04-11 09:51:15,226 [18] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - RuntimeBinderException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null]]
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'Orchard.Modules.Models.ModuleEntry' to 'Orchard.ContentManagement.ContentPart'
   at CallSite.Target(Closure , CallSite , Object )
   at Orchard.DesignerTools.Services.WidgetAlternatesFactory.<Displaying>b__5(ShapeDisplayingContext displayedContext)
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Users\sebros\My Projects\Orchard\src\Orchard\InvokeExtensions.cs:line 17
I shortened it, it repeats the last part a lot. What's odd about this log is the reference to C:\Users\sebros.... I don't know why it's pointing to that, it's not my username and it's not being run locally.
Apr 17, 2013 at 2:38 PM
So I have two different sites using Orchard. One is successfully using Rules, the other is not. The first one has 5 tables in SQL, Rules_ActionRecord, EventRecord, RuleRecord, ScheduledActionRecord, and ScheduledActionTaskRecord. In the database for the site with the issues with the Rules, there are no tables. It's like it's not fully installing or something. Any ideas?