Null Reference after 1.3 -> 1.4.0 upgrade

Topics: Core, General, Troubleshooting
Jul 30, 2012 at 6:05 AM

Funny, I tested this upgrade with the only difference being SQL Compact vs SQL Express. The whole point of upgrading was to have Rules work correctly so that we can have it email a shared mailbox when a new blog post is posted.

If I have the rule enabled to email something when a new blog post is published (it's the only rule), I get the exception shown below.

Oddly, it appears there have been a number of corrections applied for this but the change set seems atypical for me.    Rather than showing me a single cs or file it's showing a folder.

Blog posts like these seem to point at similar issues.  The second does a good job of explaining what I think my issue is.

http://orchard.codeplex.com/workitem/18819

http://orchard.codeplex.com/discussions/387984

I added an Image field to my BlogPost Part in v1.3 of Orchard.......

And these are the fixes that seem to show odd change sets so I'm confused on what actually changed?

http://orchard.codeplex.com/SourceControl/changeset/fda16f52639e

http://orchard.codeplex.com/SourceControl/changeset/f4c1b358bd44

Can someone please assist?

 

Stack:

2012-07-30 00:52:25,346 [12] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caughtSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.   at Orchard.Users.Handlers.ContactMessagesAlteration.Sending(MessageContext context)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)   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:\CMS\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:\CMS\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:\CMS\src\Orchard\Events\DefaultOrchardEventBus.cs:line 52

Jul 30, 2012 at 6:11 AM

Okay, I fxed it 15 seconds after I posted this but will keep it for future people.

 

after an upgrade (or actually any module enable or disable) it seems like it's a good idea to delete the cache.dat file in the app_data folder.  That solved it for me.