Search
Font Size:
You're here: Resources » Forums
Forum
HomeHomeBeta Discussion...Beta Discussion...Beta BugsBeta Bugs5.05.0Error when posting to a thread that is already being trackedError when posting to a thread that is already being tracked
Previous
 
Next
New Post
8/30/2010 7:52 AM
 
I am getting an error when committing a new post: I assume this is happening when I am posting to a thread that I am already tracking. Perhaps a post or edit of an existing thread should check to see if notification is already in place and if so it should be an update rather than insert this way you can remove notification of the thread if you want.

InnerException: Violation of PRIMARY KEY constraint 'PK_Forum_TrackedThreads'. Cannot insert duplicate key in object 'dbo.Forum_TrackedThreads'. The statement has been terminated.
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Data.SqlClient.SqlConnection.OnError
StackTrace
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Violation of PRIMARY KEY constraint 'PK_Forum_TrackedThreads'. Cannot insert duplicate key in object 'dbo.Forum_TrackedThreads'. The statement has been terminated. ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_Forum_TrackedThreads'. Cannot insert duplicate key in object 'dbo.Forum_TrackedThreads'. The statement has been terminated.at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues)at DotNetNuke.Modules.Forum.SqlDataProvider.TrackingThreadCreateDelete(Int32 ForumID, Int32 ThreadID, Int32 UserID, Boolean Add, Int32 ModuleID)at DotNetNuke.Modules.Forum.TrackingController.TrackingThreadCreateDelete(Int32 ForumID, Int32 ThreadID, Int32 UserID, Boolean Add, Int32 ModuleID)at DotNetNuke.Modules.Forum.PostConnector.PostToDatabase(Int32 TabID, Int32 ModuleID, Configuration objConfig, Int32 PortalID, ForumUserInfo objForumUser, String PostSubject, String PostBody, ForumInfo objForum, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String lstAttachmentFileIDs, String RemoteAddress, Int32 PollID, Int32 ThreadID, PostAction objAction, Boolean IsModerated, List`1 Terms)at DotNetNuke.Modules.Forum.PostConnector.PostingValidation(Int32 TabID, Int32 ModuleID, Int32 PortalID, Int32 UserID, String PostSubject, String PostBody, Int32 ForumID, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String lstAttachmentFileIDs, String RemoteAddress, Int32 PollID, Boolean IsQuote, String Provider, Int32 ThreadID, List`1 Terms)at DotNetNuke.Modules.Forum.PostConnector.SubmitInternalPost(Int32 TabID, Int32 ModuleID, Int32 PortalID, Int32 UserID, String PostSubject, String PostBody, Int32 ForumID, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String AttachmentFileIDs, String RemoteAddress, Int32 PollID, Boolean IsQuote, Int32 ThreadID, List`1 Terms)at DotNetNuke.Modules.Forum.PostEdit.cmdSubmit_Click(Object sender, EventArgs e)--- End of inner exception stack trace ---
Source

 
New Post
9/12/2010 2:40 AM
 
I am having a hard time reproducing this one. I subscribed to a thread that i didn't start. I also subscribed to a thread I started (from post edit). In both cases I attempted to quote a thread and submit. In post edit screen, I saw that the 'notification' checkbox was not displayed when attempting to reply (which is proper). I also noticed that all notifications checkboxes were checked in proper views (post edit of original post i subscribed to, both threads, also in post view's bottom right hand corner checkbox). I don't believe I did anything since the last release that would have corrected this. 
 
New Post
9/12/2010 5:37 AM
 
this must be a local issue for me.  I modified the editpost.ascx file and set the property for "checked" to true. so I can get the default selection on notification to be checked.  I guess this may be causing an issue in situations where the user is already subscribed.  In your code it looks like you shut off the property. Can you add something programmatically that will allow the admin to select the default notification on of off for new posts and replies so I dont have to do it in the ascx file?

<
td class="Forum_Row_AdminR" align="left" width="80%">
    <asp:checkbox id="chkNotify" Runat="server" CssClass="Forum_NormalTextBox" 
        Checked="True" />
 
New Post
9/12/2010 3:44 PM
 
I think adding this would be a conflict of settings. A user has two options of their own, Enable "My Post" Notify and Notify on Reply. The latter of which is where the conflict would be. 
 
New Post
9/12/2010 6:12 PM
 
Hi Joiseystud good input.  
 
Previous
 
Next
HomeHomeBeta Discussion...Beta Discussion...Beta BugsBeta Bugs5.05.0Error when posting to a thread that is already being trackedError when posting to a thread that is already being tracked


Top Discussions
All time, we have 601 new thread(s) and 1981 new post(s)
The most popular thread has been 4.5.0 Release Posted
The most active thread has been 4.5.2 Bug
Users Online
Membership Membership:
Latest New User Latest: daniel.almond
New Today New Today: 0
New Yesterday New Yesterday: 1
User Count Overall: 1556

People Online People Online:
Visitors Visitors: 7
Members Members: 0
Total Total: 7

Online Now Online Now: