orchardcmsorchardcms-1.8orchard-modules

Disabled Orchard Module (feature) / Entire site is broken


I was trying to make changes to a module. I couldn't get the site to seem to reflect those changes. I thought I could possibly disable the feature, and re-enable the feature and it would force whatever module caching is happening to reload the module. However, it broke the site entirely, and now I can't even enable the feature from the orchard.exe command line tool. I am getting the same error. It's basically Autofac complaining that it can't find a type that was part of the feature. However, if the feature is removed, I am not sure where/why it is still trying to load.

Exception :

None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'RCAM.Products.Drivers.FeaturedProductsWidgetPartDriver' can be invoked with the available services and parameters:
Cannot resolve parameter 'RCAM.Products.Services.IProductService productService' of constructor 'Void .ctor(RCAM.Products.Services.IProductService)'.

I cannot get in the admin portal to re-enable the feature. I cannot use the command line tool. I tried setting the [Settings_ShellFeatureStateRecord] to Up in the database, but that didn't change anything at all. It must be file driven as well as database persisted.

This is a production site and is currently down. Any help you can give would be greatly appreciated.


Solution

  • Your question doesn't make it clear if you changed the code directly on your production site or if it crashed after a proper deployment, so here are my two cents:

    If you make changes to your module in a live environment you should delete the contents of your App_Data/Dependencies-Folder afterwards. No need to re-enable the module.

    This will only work, if you haven't disabled the Dynamic Module loader, which should be done though in a production environment.


    Otherwise, make sure your module actually compiles. You should probably add your Module to Orchard.Webs build dependencies to make sure it actually re-compiles every time you run Orchard on your dev machine.

    For removing the feature, instead of just disabling it, it should be enough remove your module folder and delete YourModule.dll from App_Data/Dependencies