Unable to Update Orchard.Comments to 1.8.1

Topics: Installing Orchard, Troubleshooting
Jul 15, 2014 at 12:31 PM
I'm trying to update to Orchard 1.8.1 (from 1.6) and only have comments left to update and see this under features:
Some features need to be upgraded: Orchard.Comments
When I click on the Update link I get the following error message:

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back

The parameters dictionary contains a null entry for parameter 'bulkAction' of non-nullable type 'Orchard.Modules.ViewModels.FeaturesBulkAction' for method 'System.Web.Mvc.ActionResult FeaturesPOST(Orchard.Modules.ViewModels.FeaturesBulkAction, System.Collections.Generic.IList1[System.String], System.Nullable1[System.Boolean])' in 'Orchard.Modules.Controllers.AdminController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters

System.ArgumentException: The parameters dictionary contains a null entry for parameter 'bulkAction' of non-nullable type 'Orchard.Modules.ViewModels.FeaturesBulkAction' for method 'System.Web.Mvc.ActionResult FeaturesPOST(Orchard.Modules.ViewModels.FeaturesBulkAction, System.Collections.Generic.IList1[System.String], System.Nullable1[System.Boolean])' in 'Orchard.Modules.Controllers.AdminController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters at System.Web.Mvc.ActionDescriptor.ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary2 parameters, MethodInfo methodInfo) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.<InvokeActionMethodFilterAsynchronouslyRecursive>b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.<InvokeActionMethodFilterAsynchronouslyRecursive>b__41()


Anyone with ideas?
Jul 15, 2014 at 4:53 PM
I fixed it. It was two issues, the reason it showed that it needed an update was some stale records in the Orchard DB, once I removed them and started the upgrade over it worked. But before finding that one out I discovered that the "Update" bulk action is missing from the dropdown on the Features Admin page and that is the reason to the error seen above. An update to Orchard.Modules\Views\Admin\Features.cshtml according to below (the 5th row) is needed to get updates to work:
<select id="publishActions" name="bulkAction">
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.None, T("Choose action...").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Enable, T("Enable").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Disable, T("Disable").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Update, T("Update").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Toggle, T("Toggle").ToString())
</select>
Marked as answer by wictor on 7/15/2014 at 8:53 AM
Aug 9, 2014 at 1:45 PM
wictor wrote:
I fixed it. It was two issues, the reason it showed that it needed an update was some stale records in the Orchard DB, once I removed them and started the upgrade over it worked. But before finding that one out I discovered that the "Update" bulk action is missing from the dropdown on the Features Admin page and that is the reason to the error seen above. An update to Orchard.Modules\Views\Admin\Features.cshtml according to below (the 5th row) is needed to get updates to work:
<select id="publishActions" name="bulkAction">
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.None, T("Choose action...").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Enable, T("Enable").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Disable, T("Disable").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Update, T("Update").ToString())
                @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Toggle, T("Toggle").ToString())
</select>
Excuse me, what stale records need to be removed?
I have added the missing line: @Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Update, T("Update").ToString()),
now when I clicked the Upgrade button, there's no error shown, but also no other response, the page will still show that:
Some features need to be upgraded: Orchard.Autoroute, Orchard.MediaLibrary
Thanks
Nov 7, 2014 at 10:33 AM
If you install with MySql, it is because of some issues with the Migrations.
The migrations instruct Orchard to create a table with some indexes on columns that are too large for an index to be created on them.
If you remove the index parts from the migrations.cs file, they will work..
see: https://orchard.codeplex.com/workitem/20951 for the AutoRoute component. The same applies to the MediaLibrary Component.