Problem upgrading to 1.1

Topics: Installing Orchard, Troubleshooting
Apr 14, 2011 at 5:31 PM

I did a not-so-clean upgrade to a 1.0 site and on first invocation I get:

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0535: 'Lucene.Models.LuceneDocumentIndex' does not implement interface member 'Orchard.Indexing.IDocumentIndex.Add(string, double)'

Source Error:


Line 9:  namespace Lucene.Models {
Line 10: 
Line 11:     public class LuceneDocumentIndex : IDocumentIndex {
Line 12: 
Line 13:         public List<AbstractField> Fields { get; private set; }


Source File: c:\WebRoot\localuser\silverlightmadam_com\Modules\Lucene\Models\LuceneDocumentIndex.cs    Line: 11


Ideas?

Coordinator
Apr 14, 2011 at 6:02 PM

You should probably do a clean upgrade: it seems like you Lucene module was damaged in the process or incompletely upgraded.. Actually I think I'm going to remove the not so clean version as there is just too much potential for errors such as this.

Apr 14, 2011 at 6:48 PM

Where is the information as to which modules are enabled/disabled stored?

Is it possible to just disable the module?

Coordinator
Apr 14, 2011 at 6:50 PM

Well, don't you need it? If you don't, your easiest option is just to remove it.

Apr 14, 2011 at 6:56 PM
bertrandleroy wrote:

Well, don't you need it? If you don't, your easiest option is just to remove it.

Can't I just remove it, get the site running and then add it again from the Gallery?

My question then becomes how does one cleanly remove this module?

Coordinator
Apr 14, 2011 at 7:00 PM

Removing the folder is fine yes.

Apr 14, 2011 at 7:22 PM
bertrandleroy wrote:

Removing the folder is fine yes.

That is good to know. SO in general the way to uninstall a module is to simply delete the folder and Orchard will (hopefully) react gracefully?

Anyway I deleted Lucene and Indexing and now the site comes up just fine.

There were some other residual issues such as formatting of the admin pages. As you know, there are some files in the modules folders for the old version that are not included in the new version. With a clean upgrade they would disappear while a not-so-clean upgrade leaves them. I use Beyond Compare as my FTP client so I was easily able to identify those files on the site by comparing the site to a vanilla install of Orchard 1.1. Once I deleted these obsolete files the formatting improved greatly.

Now I am left with a residual issue in that I can't install from the gallery, I get the stack trace below. I have no idea if (or how) this is related.

None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Packaging.Controllers.PackagingServicesController' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Packaging.Services.IPackageManager, Orchard.Packaging.Services.IPackagingSourceManager, Orchard.UI.Notify.INotifier, Orchard.FileSystems.AppData.IAppDataFolderRoot, Orchard.IOrchardServices, Orchard.Modules.Services.IModuleService, Orchard.Recipes.Services.IRecipeHarvester, Orchard.Recipes.Services.IRecipeManager)' parameter resolution failed at parameter 'Orchard.Recipes.Services.IRecipeHarvester recipeHarvester'.

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: Autofac.Core.DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Packaging.Controllers.PackagingServicesController' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Packaging.Services.IPackageManager, Orchard.Packaging.Services.IPackagingSourceManager, Orchard.UI.Notify.INotifier, Orchard.FileSystems.AppData.IAppDataFolderRoot, Orchard.IOrchardServices, Orchard.Modules.Services.IModuleService, Orchard.Recipes.Services.IRecipeHarvester, Orchard.Recipes.Services.IRecipeManager)' parameter resolution failed at parameter 'Orchard.Recipes.Services.IRecipeHarvester recipeHarvester'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[DependencyResolutionException: None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Packaging.Controllers.PackagingServicesController' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Packaging.Services.IPackageManager, Orchard.Packaging.Services.IPackagingSourceManager, Orchard.UI.Notify.INotifier, Orchard.FileSystems.AppData.IAppDataFolderRoot, Orchard.IOrchardServices, Orchard.Modules.Services.IModuleService, Orchard.Recipes.Services.IRecipeHarvester, Orchard.Recipes.Services.IRecipeManager)' parameter resolution failed at parameter 'Orchard.Recipes.Services.IRecipeHarvester recipeHarvester'.]
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +309
   Autofac.Core.Resolving.ComponentActivation.Activate(IEnumerable`1 parameters) +48
   Autofac.Core.Resolving.ComponentActivation.Execute(IEnumerable`1 parameters) +97
   Autofac.Core.Resolving.ResolveOperation.Resolve(ISharingLifetimeScope activationScope, IComponentRegistration registration, IEnumerable`1 parameters) +181
   Autofac.Core.Lifetime.LifetimeScope.Resolve(IComponentRegistration registration, IEnumerable`1 parameters) +91
   Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +72
   Autofac.ResolutionExtensions.TryResolve(IComponentContext context, Service service, Object& instance) +44
   Orchard.Mvc.OrchardControllerFactory.TryResolve(WorkContext workContext, Object serviceKey, T& instance) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\OrchardControllerFactory.cs:26
   Orchard.Mvc.OrchardControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\OrchardControllerFactory.cs:71
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +66
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +209
   System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +50
   System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
   Orchard.Mvc.Routes.HttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\Routes\ShellRoute.cs:141
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841400
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

 

Coordinator
Apr 14, 2011 at 7:27 PM

Are recipes enabled?

Apr 14, 2011 at 7:49 PM

> Are recipes enabled?

No. Unfortunately this site is on a remote server using a SQL Server DB with integrated security and I have FTP access.

So according to the docs, there is no way to enable Recipies since I do not have command like access :-(

Which begs the question, what does enabling Recipies do, write to a file in the App_Data folder? Since I have access to the App_Data folder can I enable Recipies by simply editing one of the files there?

Coordinator
Apr 14, 2011 at 7:57 PM

As the upgrade documentation explains, the upgrade should be done on your local dev machine, and then deployed to the server. This way, you can run the command-line and enable the Recipes module. If you attempt to upgrade on the server directly, you are endangering the integrity of your site and it is pretty much guaranteed to go all sorts of wrong.

Apr 14, 2011 at 8:19 PM

> As the upgrade documentation explains, the upgrade should be done on your local dev machine, and then deployed to the server. This way, you can run the command-line and enable the Recipes module. If you attempt to upgrade on the server directly, you are endangering the integrity of your site and it is pretty much guaranteed to go all sorts of wrong.

I understand, this is not a production site, it is pre-production.

But curious minds would still like to know, does enabling Recipies simply make changes to the App_Data folder or does it store changes in the database as well?

Coordinator
Apr 14, 2011 at 8:21 PM

It does changes in the database, like any module.

Apr 14, 2011 at 8:29 PM

> It does changes in the database, like any module.

Thanks.

Out of curiosity, why did you ask if I had recipies enabled? Would that have affected my ability to download modules from the gallery?

Coordinator
Apr 14, 2011 at 8:37 PM

Yes, modules can now have recipes, and not having the module enabled can have unpredictable results: the gallery and module infrastructure depends on it.