Forum unknown error

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.
2/10/2009 8:39:42 PM
Gravatar
Total Posts 33
www.jaosobne.cz
Windows Server 2008 R2
Microsoft SQL Server 2008
MojoPortal 2.3.6.2

Forum unknown error

Hi. I tried to rename and move one thread in the Forum into another Discussion (Category, Subforum, however its called in english). But mojoPortal returned error - and since I do not have detailed errors enabled for clients, I can not track the issue. Where is the error logged?

My current situation is that the Forum main page shows 0 threads and 1 posts in the old Subforum and 1 threads and 0 posts in the new one. I suppose, the error occured when mojoPortal tried to update the forum post counts.

Thanks for any help

2/11/2009 4:25:45 AM
Gravatar
Total Posts 18439

Re: Forum unknown error

You can view the error log from Administration > System Log or by downloading the file /Data/currentlog.config

It could be a bug, I admit I have not used or tested that move a thread feature in a long time. 

Best,

Joe

2/11/2009 5:30:44 AM
Gravatar
Total Posts 33
www.jaosobne.cz
Windows Server 2008 R2
Microsoft SQL Server 2008
MojoPortal 2.3.6.2

Re: Forum unknown error

Got it :-)

 2009-02-11 03:31:31,146 ERROR mojoPortal.Web.mojoBasePage - 84.242.67.5-cs-CZ - /Forums/EditThread.aspx?thread=4&mid=11&pageid=7
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'MostRecentPostUserID', table 'Mojoportal.dbo.mp_Forums'; column does not allow nulls. UPDATE fails.
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.SqlDataReader.ConsumeMetaData()
  at System.Data.SqlClient.SqlDataReader.get_MetaData()
  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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
  at System.Data.SqlClient.SqlCommand.ExecuteScalar()
  at mojoPortal.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
  at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
  at mojoPortal.Data.SqlParameterHelper.ExecuteScalar()
  at mojoPortal.Data.DBForums.RecalculatePostStats(Int32 forumId)
  at mojoPortal.Business.ForumThread.UpdateThread()
  at mojoPortal.Web.ForumUI.ForumThreadEdit.btnUpdate_Click(Object sender, EventArgs e)
  at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
  at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2009-02-11 03:31:31,165 ERROR mojoPortal.Web.Global - 84.242.67.5-cs-CZ - /Forums/EditThread.aspx?thread=4&mid=11&pageid=7
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'MostRecentPostUserID', table 'Mojoportal.dbo.mp_Forums'; column does not allow nulls. UPDATE fails.
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.SqlDataReader.ConsumeMetaData()
  at System.Data.SqlClient.SqlDataReader.get_MetaData()
  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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
  at System.Data.SqlClient.SqlCommand.ExecuteScalar()
  at mojoPortal.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
  at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
  at mojoPortal.Data.SqlParameterHelper.ExecuteScalar()
  at mojoPortal.Data.DBForums.RecalculatePostStats(Int32 forumId)
  at mojoPortal.Business.ForumThread.UpdateThread()
  at mojoPortal.Web.ForumUI.ForumThreadEdit.btnUpdate_Click(Object sender, EventArgs e)
  at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
  at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

2/11/2009 6:53:50 AM
Gravatar
Total Posts 18439

Re: Forum unknown error

Ok, I just fixed it here so it wil be fixed in the next reease. 

You can fix it immediately if you edit the stored procedure mp_Forums_RecalculatePostStats.

Look near the botton there is an update statement with:

MostRecentPostUserID = @MostRecentPostUserID,

change it to:

MostRecentPostUserID = COALESCE(@MostRecentPostUserID,0),

Thanks for the bug report.

Best,

Joe

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