This project is read-only.

Combinator settings in recipe causes recipe to fail if Combinator module isn't enabled

Topics: General, Troubleshooting, Writing modules
Feb 29, 2012 at 8:28 PM

I've had a tag in my recipe for a while now, and Piedone.Combinator module has been disabled in my development environment recipe. Today when I added an attribute to the Combinator settings the recipe started failing. Recipe runs fine if i either enable Combinator, or remove the EnableForAdmin attribute: 

<CombinatorSettingsPart CombinationExcludeRegex="tiny_mce|slugify" CombineCDNResources="false" MinifyResources="true" EmbedCssImages="false" EmbeddedImagesMaxSizeKB="15" EnableForAdmin="true" />
Not a big problem -- I can just comment out the settings because I'm not using Combinator during development, where I am using this recipe. Just wondering if it's an Orchard bug, a Combinator bug, or a TheMonarch bug? 

Feb 29, 2012 at 9:14 PM

Wait, I think it's a TheMonarch bug :)

Feb 29, 2012 at 9:18 PM

Are you sure the module updated properly from v1.2 so the EnableForAdmin column was added to the DB? I think it could be a problem that it hasn't (e.g. because you updated the module folder but after that haven't enabled it not even once?), therefore in the recipe you declare an attribute that can't be mapped to a column.

Feb 29, 2012 at 9:48 PM
Edited Feb 29, 2012 at 9:54 PM

Yup, pretty sure the error has nothing to do with Combinator. I wipe out the entire db and rebuild everything from scratch a few times a day so no problems with migrations. 

I found the problem was due to some incomplete code I uncommented out from my Migrations.cs last night. I wish it were easier to track down errors in recipes. Maybe try/catch around an entire recipe or each major step of a recipe, and then pass the underlying exception as an inner one. That way the error logscould tell me which recipe failed, and at what step. I was getting errors related to NHibernate and I had no idea why, or what part of my recipe caused it.