Orchard 1.8.1 Installation with MySQL
Asked Answered
D

1

6

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.

Decontaminate answered 15/7, 2014 at 8:30 Comment(2)
You should probably file a bug.Glomeration
orchard.codeplex.com/workitem/20807Decontaminate
C
7

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

Cosmotron answered 29/1, 2015 at 10:55 Comment(3)
Thank you. I switched to Orchard with MS SQL Express. Are you using Orchard CMS with MySQL? Do you know if they are going to fix the bug in 1.8.3?Decontaminate
I am running Orchard with MySQL, however I made the above code change before cooking. If you make the change after orchard has generated the database you will still see the error, I believe you would need to manually change the database.Cosmotron
Worthwhile to note that SchemaBuilder.AlterTable(...) appears more than once in each of the migrations files with the same paramaters! Updating all occurrences seems to have done the trick for me.Weisburgh

© 2022 - 2024 — McMap. All rights reserved.