woboti3492
2021-03-24T09:25:27Z
Version: YetAnotherForum.NET v2.3.1.13
File: YAF-v2.3.1.13-Install.zip
SHA256: 5179ff2ba3ccc118f601adb593ed768d6eeac0cadb5f0a261fe317c4388a793d
Server OS: Windows Server 2019
Microsoft Windows NT 10.0.17763.0
.NET Framework Version: 4.7.2
SQL Server: Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

I get the following error message when trying to post a new topic with an existing tag. The topic seems to get posted anyway despite the error.

[SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK__yaf_Topi__657CFA4C9AA0C459'. Cannot insert duplicate key in object 'dbo.yaf_TopicTag'. The duplicate key value is (1).
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3317868
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +736
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4061
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +90
System.Data.SqlClient.SqlDataReader.get_MetaData() +99
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +604
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3303
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +667
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +83
System.Data.SqlClient.SqlCommand.ExecuteScalar() +359
ServiceStack.OrmLite.OrmLiteResultsFilterExtensions.ExecLongScalar(IDbCommand dbCmd, String sql) in C:\YAFNET\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteResultsFilterExtensions.cs:226
ServiceStack.OrmLite.OrmLiteWriteCommandExtensions.Insert(IDbCommand dbCmd, T obj, Action`1 commandFilter, Boolean selectIdentity) in C:\YAFNET\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteWriteCommandExtensions.cs:734
ServiceStack.OrmLite.<>c__DisplayClass5_0`1.<Insert>b__0(IDbCommand dbCmd) in C:\YAFNET\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteWriteApi.cs:72
ServiceStack.OrmLite.OrmLiteExecFilter.Exec(IDbConnection dbConn, Func`2 filter) in C:\YAFNET\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteExecFilter.cs:70
YAF.Core.Data.DbAccessBase.Execute(Func`2 execFunc, IDbCommand cmd, IDbTransaction dbTransaction) +281
YAF.Core.Extensions.IRepositoryExtensions.Insert(IRepository`1 repository, T entity, IDbTransaction transaction) +334
YAF.Core.Model.TopicTagRepositoryExtensions.Add(IRepository`1 repository, Int32 tagId, Int32 topicId) +93
YAF.Pages.<>c__DisplayClass10_1.<PostReply_Click>b__2(String tag) +198
System.Collections.Generic.List`1.ForEach(Action`1 action) +100
YAF.Pages.PostTopic.PostReply_Click(Object sender, EventArgs e) +4415
Sponsor
tha_watcha
2021-03-24T12:01:11Z
Thanks for the Report. Issue will be fixed with the next update.
UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved