Error Event.date System.ObjectDisposedException

Topics: Administration, Customizing Orchard, General
Oct 25, 2012 at 3:39 PM

Hello.

I have a problem with module Alois Event Date, after download and install the module, my site show this message:

 System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.

and this text:

[ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.]
   Autofac.Core.Lifetime.LifetimeScope.CheckNotDisposed() +57
   Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag) +47
   Orchard.Environment.WorkContextAccessor.CreateWorkContextScope(HttpContextBase httpContext) in c:\Build\Orchard\src\Orchard\Environment\WorkContextAccessor.cs:40
   Orchard.Mvc.Routes.HttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) in c:\Build\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:134
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970356
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

 


Developer
Oct 25, 2012 at 6:20 PM

It seems a couple people are having problems with it. Let me download and have a look

Developer
Oct 25, 2012 at 6:42 PM
Edited Oct 25, 2012 at 6:51 PM

Okay so you need to do this...

1. Go to the AssemblyInfo.cs file and remove the line that says [assembly: SecurityTransparent]

2. Next head on over to the file Alois.EventDate\Views\Parts\EventDate.Metadata.SummaryAdmin.cshtml 

Replace 

@Html.DateTime(EventDate.ToLocalTime(), T("M/d/yyyy h:mm tt"))

with

@Display.DateTime(DateTimeUtc: (DateTime)EventDate.ToLocalTime(), CustomFormat: T("M/d/yyyy h:mm tt"))

But there is a bug with ToLocalTime... so you could try

@Display.DateTime(DateTimeUtc: (DateTime)EventDate, CustomFormat: T("M/d/yyyy h:mm tt"))

3. You will then see this error..

A 'stylesheet' named 'jQueryUtils_TimePicker' could not be found.

Sooo Open up EventDate.cshtml

and replace

    Script.Require("jQueryUtils_TimePicker");
    Script.Require("jQueryUI_DatePicker");
    Style.Require("EventDate_DatePicker");
    Style.Require("jQueryUtils_TimePicker");
    Style.Require("jQueryUI_DatePicker");

with

    Script.Require("jQueryUI_TimePicker");
    Script.Require("jQueryUI_DatePicker");
    Style.Require("EventDate_DatePicker");
    Style.Require("jQueryUI_TimePicker");
    Style.Require("jQueryUI_DatePicker");

.... Okay So try that.

Nick

Oct 25, 2012 at 8:07 PM

Woow! thx so much, now is working very good, 

thx for your time and cooperation, 

 

Saludos.-