Orchard 1.8.1 Installation with MySQL

I used Orchard 1.8 for my previous project. I decided to try 1.8.1. I am using MySQL. Atfer I compiled Orchard 1.8.1 sources and installed it with an empty database. The following message appears on the control panel:

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

When I click update. This message appears:

  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 

...

Since 1.8, I also noticed some problems with MySQL. There seems to be problems with a type with a null value.

If there was some way to change the server configuration. I have full access to the database server.

+6
source share
1 answer

The problem is that the length of the DisplayAlias ​​index is set to 2048 bytes, the MySQL indexes can be no more than 767 bytes.

To fix the problem, follow these steps:

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

in

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

in Orchard.Autoroutes Migrations.cs

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

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

See the AoutroutePartRecord Index in the MySQL Issue section for more details.

+7
source

Source: https://habr.com/ru/post/972235/


All Articles