Borked Orchard Installation

Topics: Administration, Installing Orchard, Troubleshooting
Nov 3, 2013 at 10:48 PM
I've got a thoroughly borked Orchard installation.

I was attempting to diagnose an issue with Workflow and tokens not resolving in the Mail activity, and I deactivated the Workflow feature via the Admin UI. After I deactivated the Workflow feature, my site has immediately stopped responding - all URL's result in a 404 not found message.

I downloaded a copy of my site and attempted to re-enable the Workflow feature via the Orchard command line; all my commands (feature list / feature enable) now throw an exception:

__None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Security.Authorizer' can be invoke
d with the available services and parameters:
Cannot resolve parameter 'Orchard.Security.IAuthorizationService authorizationService' of constructor 'Void .ctor(Orchard.Security.IAuthorizationService, Orchar
d.UI.Notify.INotifier, Orchard.IWorkContextAccessor)'.

Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFin
derWrapper' on type 'Orchard.Security.Authorizer' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Security.IAuthorizationService authorizationService' of constructor 'Void .ctor(Orchard.Security.IAuthorizationService, Orchar
d.UI.Notify.INotifier, Orchard.IWorkContextAccessor)'.__

My site is down and has been for hours; good news, I get three visits a month. :) In any case, I really don't want to lose my data. Does anyone have any suggestions for how I might recover from this? Or what is going on?

I did recently upgrade from Orchard 1.7 to 1.7.1, but the site rendered just fine after the upgrade. The failure began immediately after deactivating the Workflow module - in fact, the refresh of the feature list page failed with a 404 error.

Thanks!
Nov 3, 2013 at 11:18 PM
Roles module seems to depend on Workflow module, and when you disabled Workflow, I guess Roles are disabled as well. So there is no authorization service implementation on your site anymore.

I don't know how to recover from this. Probably only by modifying setting in DB (Settings_ShellStateRecord looks like it) and maybe other files/records.


Nov 4, 2013 at 4:22 AM
Unfortunately, manually editing the database to re-enable the features isn't doing it.

My entire site is offline, with no obvious way to restore things. Help!
Coordinator
Nov 4, 2013 at 9:06 AM
You should be able to restore the features from the command-line. Restoring a recent backup should also work.
Nov 4, 2013 at 6:14 PM
What would the command be to restore from command line? feature enable is tossing exceptions (as is feature list, etc.).

As for a backup... unfortunately, I don't have one (I know, I know. Personal site. Low priority for me until its down. Cobblers child. All that.)
Coordinator
Nov 4, 2013 at 7:35 PM
What kind of exception?
Developer
Nov 4, 2013 at 7:35 PM
When you enable the features manually from the database, make sure you update the following tables:
  • Settings_ShellFeatureRecord
  • Settings_ShellFeatureStateRecord
When you made sure the required features are there and enabled, delete cache.dat from App_Data and recycle the application pool (touching web.config ususally does the trick).