1
Vote

null ref. error when running recipe from command line

description

From the command line, I ran a recipe to update existing content items that have an autoroute part. I got the below error. Looked into it a little, could it be because Contrib.Cache's OnPublished handler lambda is called CacheService.GetCacheItems(), which assumes you are running from a web app context?

2012-11-30 17:37:04,011 [1] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Contrib.Cache.Handlers.CacheSettingsPartHandler
System.NullReferenceException: Object reference not set to an instance of an object.
at Contrib.Cache.Services.CacheService.<GetCacheItems>d__0.MoveNext()
at Contrib.Cache.Handlers.CacheSettingsPartHandler.<>c__DisplayClass5.<.ctor>b__2(IContent p)
at Contrib.Cache.Handlers.CacheSettingsPartHandler.<.ctor>b__1(PublishContentContext context, IContent part)
at Orchard.ContentManagement.Handlers.ContentHandler.InlineStorageFilter1.Published(PublishContentContext context, TPart instance) in c:\projects\myproject-master\src\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 156
at Orchard.ContentManagement.Handlers.StorageFilterBase
1.Orchard.ContentManagement.Handlers.IContentStorageFilter.Published(PublishContentContext context) in c:\projects\myproject-master\src\Orchard\src\Orchard\ContentManagement\Handlers\StorageFilterBase.cs:line 81
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.Published(PublishContentContext context) in c:\projects\myproject-master\src\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 274
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass3f.<Publish>b__3d(IContentHandler handler) in c:\projects\myproject-master\src\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 357
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable1 events, Action1 dispatch, ILogger logger) in c:\projects\myproject-master\src\Orchard\src\Orchard\InvokeExtensions.cs:line 17

comments