我一直在使用Orchard 1.8作为我以前的项目.我决定尝试1.8.1我正在使用MySQL.Atfer我编译了Orchard 1.8.1的源代码并安装了一个空白数据库.仪表板中出现以下消息:
Some features need to be upgraded: Orchard.Autoroute, Orchard.MediaLibrary
Run Code Online (Sandbox Code Playgroud)
当我点击更新.出现此消息:
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
Run Code Online (Sandbox Code Playgroud)
...
使用1.8我已经注意到MySQL的一些问题.似乎可空类型存在问题.
如果有办法以某种方式更改服务器配置.我完全接受了数据库服务器.
问题是因为DisplayAlias索引长度设置为2048字节,MySQL索引可以不超过767字节.
要解决问题更改:
SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
.CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias"));
Run Code Online (Sandbox Code Playgroud)
至:
SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
.CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias(767)"));
Run Code Online (Sandbox Code Playgroud)
在Orchard.Autoroutes Migrations.cs
该修复程序还可以应用于"FolderPath"索引上的MediaLibrary迁移:
SchemaBuilder.AlterTable("MediaPartRecord", t => t
.CreateIndex("IDX_MediaPartRecord_FolderPath", "FolderPath(767)"));
Run Code Online (Sandbox Code Playgroud)
有关更多详细信息,请参阅MySQL问题下的AoutroutePartRecord索引
| 归档时间: |
|
| 查看次数: |
745 次 |
| 最近记录: |