Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to re-enable Orchard CMS features without Dashboard or command line

Tags:

orchardcms

I just disabled the Comments feature on my Orchard installation, not realising it was a dependency of Disqus, and now the entire site including admin dashboard fails with this error:

None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Disqus.Comments.Services.DisqusCommentUpdateService' can be invoked with the available services and parameters: Constructor 'Void .ctor(Orchard.IOrchardServices, Disqus.Comments.Services.IDisqusMappingService, Orchard.Comments.Services.ICommentService)' parameter resolution failed at parameter 'Orchard.Comments.Services.ICommentService commentService'. 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 'Disqus.Comments.Services.DisqusCommentUpdateService' can be invoked with the available services and parameters: Constructor 'Void .ctor(Orchard.IOrchardServices, Disqus.Comments.Services.IDisqusMappingService, Orchard.Comments.Services.ICommentService)' parameter resolution failed at parameter 'Orchard.Comments.Services.ICommentService commentService'.

The Orchard installation is running on a web host and I do not have access to the command line there. I have FTP access, and access to the MS SQL database. Is there any way I can re-enable the Comments feature without access to the command line or web admin interface?

like image 259
NeilDurant Avatar asked Feb 22 '23 08:02

NeilDurant


2 Answers

There is a file, /orchard.web/app_data/cache.dat, which is an xml containing a list of which features are enabled.

The documentation warns that modifying it may have unpredictable results, so be warned: http://docs.orchardproject.net/Documentation/Developer-FAQ#What'sinApp_Data?

like image 92
Giscard Biamby Avatar answered May 16 '23 06:05

Giscard Biamby


There is a table in the database called Settings_ShellFeatureStateRecord, which stores the state for each module's feature. I re-enabled Orchard.Comments on my local installation (using SQL Server Compact Edition) with the following SQL:

update Settings_ShellFeatureStateRecord
set InstallState = 'Up',
    EnableState = 'Up'
where Name = 'Orchard.Comments'

Good luck!

like image 43
mdm Avatar answered May 16 '23 07:05

mdm