2
votes

I am in the process of upgrading from Orchard 1.7 to 1.8. Everything seems fine locally, but when I deploy my site, 1 of my custom modules is disabled. When I click the "Enable" link in the modules section of the dashboard, the page refreshes, but the module is still disabled. My local instance is connected to the same database and shows the module enabled so not really sure what is happening. I don't see any details in the standard error logs.

Is there any way to see any errors that could be causing a module to fail being enabled?

Thanks

2
recycle the appdomainBertrand Le Roy
I was able to reproduce the problem locally by pointing a full IIS site to the precompiled folder. Recycling doesn't appear to fix it.bingles
Has your module been built? If you didn't include it into the solution, it won't get built when doing build precompiled.Bertrand Le Roy
Yes, it is included in my solution, and I can see the .dll in the bin folder of my module (precompiled/modules/mymodule/bin/mymodule.dll). I do suspect it is something with building or a missing reference, but it's perplexing since I don't get any sort of error. The module shows up in the modules list with an enable link just doesn't enable so was hoping there was a way to capture whatever is the cause.bingles
Can you look into the database, table Settings_ShellFeatureStateRecord? Find the row with the name of your feature and look at the states.Bertrand Le Roy

2 Answers

1
votes

This turned out to be due to a case mismatch in my feature name vs my module folder name. My module was originally named in Pascal case ie. 'MyModule'. Somewhere along the way my folder had gotten renamed to 'Mymodule' while the Module.txt file still listed the primary feature as 'MyModule'.

I finally hunted this down by copying the Orchard.Modules.pdb file into the bin folder of my precompiled web application and attached the VS debugger to it to see what was going on. The issue presented itself inside of Orchard.Modules.Controllers.AdminController.Features() where a comparison of FeatureDescriptor.Id == ShellFeature.Name failed to match on account of the case mismatch. The result was that my feature was being shown as disabled even though it is enabled in the database.

0
votes

Not a direct answer to your question but did you do a complete rebuild before publishing your orchard site (assuming that is how you deployed it)? I have found that sometimes you have to do a rebuild all before publishing.