Error on delete forum post

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/10/2007 10:48:27 AM
Gravatar
Total Posts 18

Error on delete forum post

Hello.

I have (on hosting): W2K Server, MS SQL 2K, ASP 2, MojoPortal 2.2.4.0 (from svn).

1 bug:

On new messages in forum (with option 'Notify?' set to on) I don't get notify-messages.

2 bug:

On delete forum message I get error:

Server Error in '/' Application.
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_ForumThreadSubscriptions_mp_ForumThreads'. The conflict occurred in database 'db18887ms', table 'mp_ForumThreadSubscriptions', column 'ThreadID'.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_ForumThreadSubscriptions_mp_ForumThreads'. The conflict occurred in database 'db18887ms', table 'mp_ForumThreadSubscriptions', column 'ThreadID'.
The statement has been terminated.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_ForumThreadSubscriptions_mp_ForumThreads'. The conflict occurred in database 'db18887ms', table 'mp_ForumThreadSubscriptions', column 'ThreadID'.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +862234
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739110
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +903
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +77
mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +85
mojoPortal.Data.DBForums.ForumThreadDelete(Int32 threadId) +111
mojoPortal.Business.ForumThread.Delete(Int32 threadId) +202
mojoPortal.Business.ForumThread.DeletePost(Int32 postId) +280
mojoPortal.Business.ForumThread.Delete(Int32 threadId) +155
mojoPortal.Web.ForumUI.ForumThreadEdit.btnDelete_Click(Object sender, EventArgs e) +38
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Next bugs I should post with stack trace?

 

12/11/2007 5:41:01 AM
Gravatar
Total Posts 18439

Re: Error on delete forum post

Hi,

Thanks. I confirm this is a bug. I will fix this soon in svn and it will be fixed in the next release.

This only happens when deleting the last post in a thread which deletes the thread, and also only happens if someone has subscribed to the thread notification.

If you need to fix it right away you can edit the stored procedure mp_ForumThreads_Delete and add

DELETE FROM mp_ForumThreadSubscriptions

WHERE    ThreadID = @ThreadID

to the top.

Thanks,

Joe

1/27/2008 10:15:24 AM
Gravatar
Total Posts 18

Re: Error on delete forum post

Thanks. That solve this bug.

You must sign in to post in the forums. This thread is closed to new posts.