Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orchard 1.8.1 Installation with MySQL

I have been using Orchard 1.8 for my previous project. I decided to try 1.8.1 I am using MySQL. Atfer I compiled the sources of Orchard 1.8.1 and installed it with a blank database. The following message occurs in the dashboard:

Some features need to be upgraded: Orchard.Autoroute, Orchard.MediaLibrary

When I click update. This message occurs:

    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.IList`1[System.String], System.Nullable`1[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. Parametername: parameters

...

With 1.8 I have noticed some issues too with MySQL. It seems that there are problems with the nullable type.

If there was a way to change the server configuration somehow. I have full acccess to the database server.

like image 974
Matthias Avatar asked Jul 15 '14 08:07

Matthias


1 Answers

The issue is becuased the DisplayAlias index length is set to 2048 bytes, MySQL indexes can be no longer than 767 bytes.

To fix the issue change:

SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
                .CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias"));

to:

SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
                .CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias(767)"));

in Orchard.Autoroutes Migrations.cs

The fix can also be applied to the MediaLibrary Migrations on the "FolderPath" index:

SchemaBuilder.AlterTable("MediaPartRecord", t => t
                .CreateIndex("IDX_MediaPartRecord_FolderPath", "FolderPath(767)"));

For more detail see AoutroutePartRecord Index under MySQL Issue

like image 114
nqynik Avatar answered Oct 14 '22 14:10

nqynik