Long display name causes Member List exception

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/1/2011 12:50:27 PM
Gravatar
Total Posts 73

Long display name causes Member List exception

Shortening the display name avoids the issue.  This one is simple to avoid, so I'm doing that, but I thought I should report the error.

Windows Server 2003 R2

MSSQL 2008 Express

mojoPortal 2.3.5.4

Steps:

  1. Go to Administration
  2. Add New User
  3. Give a Display Name of 51 characters, such as "Adventure Consultants Ltd Adventure Consultants Ltd"
  4. Go to Member List

I get an error like this:

Server Error in '/' Application.

String or binary data would be truncated.
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: String or binary data would be truncated.
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): String or binary data would be truncated.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo) +128
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1810
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +86
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
   mojoPortal.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +222
   mojoPortal.Data.DBSiteUser.GetUserListPage(Int32 siteId, Int32 pageNumber, Int32 pageSize, String userNameBeginsWith) +267
   mojoPortal.Business.SiteUser.GetPage(Int32 siteId, Int32 pageNumber, Int32 pageSize, String userNameBeginsWith, Int32& totalPages) +105
   mojoPortal.Web.UI.Pages.MemberList.BindAlphaList() +53
   mojoPortal.Web.UI.Pages.MemberList.PopulateControls() +271
   mojoPortal.Web.UI.Pages.MemberList.Page_Load(Object sender, EventArgs e) +141
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e) +12
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

2/2/2011 6:54:28 AM
Gravatar
Total Posts 18439

Re: Long display name causes Member List exception

Thanks for the bug report Ted.

I am able to produce this problem and will fix it for the next release.

Best,

Joe

2/7/2011 1:22:08 PM
Gravatar
Total Posts 18439

Re: Long display name causes Member List exception

This is now fixed in version 2.3.6.2

http://www.mojoportal.com/mojoportal-2362-released.aspx

Thanks,

Joe

2/7/2011 1:23:51 PM
Gravatar
Total Posts 73

Re: Long display name causes Member List exception

Thanks!

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