siteserver / cms

SS CMS 基于 .NET Core,能够以最低的成本、最少的人力投入在最短的时间内架设一个功能齐全、性能优异、规模庞大并易于维护的网站平台。
https://sscms.com
GNU Affero General Public License v3.0
3.66k stars 1.21k forks source link

错误! 内容添加失败:Length cannot be less than zero. Parameter name: length #509

Open mangocode opened 6 years ago

mangocode commented 6 years ago

后台中添加或修改内容失败,提示如下

错误! 内容添加失败:Length cannot be less than zero. Parameter name: length

系统错误日志提示

at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at BaiRong.Core.Data.SqlUtils.ParseToSqlStringWithQuote(String str, Int32 length) at BaiRong.Core.Data.SqlUtils.Parse(EDatabaseType databaseType, EDataType dataType, String valueStr, Int32 length) at BaiRong.Provider.Data.SqlServer.TableStructureDAO.GetInsertSqlString(NameValueCollection attributes, String connectionString, String tableName, IDbDataParameter[]& parms) at BaiRong.Provider.Data.SqlServer.TableStructureDAO.GetInsertSqlString(NameValueCollection attributes, String tableName, IDbDataParameter[]& parms) at BaiRong.Provider.Data.SqlServer.ContentDAO.Insert(String tableName, ContentInfo contentInfo) at SiteServer.CMS.Provider.Data.SqlServer.ContentDAO.Insert(String tableName, PublishmentSystemInfo publishmentSystemInfo, ContentInfo contentInfo, Boolean isUpdateContentNum, Int32 taxis) at SiteServer.CMS.Provider.Data.SqlServer.ContentDAO.Insert(String tableName, PublishmentSystemInfo publishmentSystemInfo, ContentInfo contentInfo) at SiteServer.CMS.BackgroundPages.BackgroundContentAdd.SaveContentInfo(Boolean isAjaxSubmit, String& errorMessage)

是什么原因?

starlying commented 6 years ago

Sqlserver 数据库是那个版本知道吗

starlying commented 6 years ago

还有siteserver用的那个版本,我们测试一下

mangocode commented 6 years ago

Sqlserver2008版 SiteServer 4.1.1601 .NET版本:4.0.30319.18444

starlying commented 6 years ago

好的,我们查一下

a645037872 commented 6 years ago

这个字段里面有值:(Content | 内容 | 备注 | 内容编辑器)就会报 Length cannot be less than zero. Parameter name: length