New User Bugging Out

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/29/2012 2:58:25 AM
Gravatar
Total Posts 26

New User Bugging Out

Would be really appreciative if someone helped me out, I have just upgraded to the latest version and a custom user registration process I created last year is now bugging out at the save, Im using sql server, heres the section of code bugging out and the error message:

Code

newUser = new SiteUser(siteSettings);
newUser.LoginName = m_new.BeneficiaryId.ToString();
newUser.Name = m_new.MailingName;
newUser.Email = txtEmail.Text;
newUser.Password = SiteUser.CreateRandomPassword(7, WebConfigSettings.PasswordGeneratorChars);
newUser.Save();

Error

System.Data.SqlClient.SqlException was caught
Message=Invalid object name 'Member'.
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
class="16"
LineNumber=23
Number=208
Procedure=tg_update_email
Server=localhost\SQLExpress
State=1
StackTrace:
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()
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 mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters)
at mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at mojoPortal.Data.SqlParameterHelper.ExecuteNonQuery()
at mojoPortal.Data.DBSiteUser.UpdateUser(Int32 userId, String name, String loginName, String email, String password, String passwordSalt, String gender, Boolean profileApproved, Boolean approvedForForums, Boolean trusted, Boolean displayInMemberList, String webSiteUrl, String country, String state, String occupation, String interests, String msn, String yahoo, String aim, String icq, String avatarUrl, String signature, String skin, String loweredEmail, String passwordQuestion, String passwordAnswer, String comment, Int32 timeOffsetHours, String openIdUri, String windowsLiveId, Boolean mustChangePwd, String firstName, String lastName, String timeZoneId, String editorPreference, String newEmail, Guid emailChangeGuid, Guid passwordResetGuid, Boolean rolesChanged)
at mojoPortal.Business.SiteUser.Update()
at mojoPortal.Business.SiteUser.Create()
at mojoPortal.Business.SiteUser.Save()
at Iwi.UI.user_controls.registration_details.SaveMember()

3/29/2012 7:51:55 AM
Gravatar
Total Posts 18439

Re: New User Bugging Out

Best to work with the mojoPortal source code when developing custom features (especially for something like custom registration) so you can step through the code, find any problems caused by changes in mojoPortal  and update your custom code to solve it.

I have no idea what is causing the problem or even what the problem is but working with the source code is the only way to find out.

Hope that helps,

Joe

3/29/2012 3:23:56 PM
Gravatar
Total Posts 26

Re: New User Bugging Out

Thanks Joe, I think I need to reset my setup as VS is not letting me step through the code in mojo.business at the moment, appreciate the help!

3/31/2012 2:15:18 AM
Gravatar
Total Posts 26

Re: New User Bugging Out

I have got my VS setup going ok now, and I have isolated the issue to a stored procedure mp_Users_Update but I still dont know whats happening , I am using SQL server and I'm on the latest version of MojoPortal, the issue happens also when trying to update a member through the mojo member list functions, I have copied the error below, any help would be appreciated thanks.

Invalid object name 'Member'.

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: Invalid object name 'Member'.

Source Error:

Line 98: PrepareCommand(command, connection, null, commandType, commandText, commandParameters);
Line 99: command.CommandTimeout = commandTimeout;
Line 100: return command.ExecuteNonQuery();
Line 101: }
Line 102: }

Source File: C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Data.MSSQL\SqlHelper.cs Line: 100

Stack Trace:

[SqlException (0x80131904): Invalid object name 'Member'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2073550
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5064508
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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Data.MSSQL\SqlHelper.cs:100
mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Data.MSSQL\SqlHelper.cs:76
mojoPortal.Data.SqlParameterHelper.ExecuteNonQuery() in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:173
mojoPortal.Data.DBSiteUser.UpdateUser(Int32 userId, String name, String loginName, String email, String password, String passwordSalt, String gender, Boolean profileApproved, Boolean approvedForForums, Boolean trusted, Boolean displayInMemberList, String webSiteUrl, String country, String state, String occupation, String interests, String msn, String yahoo, String aim, String icq, String avatarUrl, String signature, String skin, String loweredEmail, String passwordQuestion, String passwordAnswer, String comment, Int32 timeOffsetHours, String openIdUri, String windowsLiveId, Boolean mustChangePwd, String firstName, String lastName, String timeZoneId, String editorPreference, String newEmail, Guid emailChangeGuid, Guid passwordResetGuid, Boolean rolesChanged) in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Data.MSSQL\dbSiteUser.cs:466
mojoPortal.Business.SiteUser.Update() in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Business\SiteUser.cs:981
mojoPortal.Business.SiteUser.Save() in C:\Websites\IwiSystem\Source\mojoportal\mojoPortal.Business\SiteUser.cs:1053
mojoPortal.Web.AdminUI.ManageUsers.UpdateUser() in C:\Websites\IwiSystem\Source\mojoportal\Web\Admin\ManageUsers.aspx.cs:642
mojoPortal.Web.AdminUI.ManageUsers.btnUpdate_Click(Object sender, EventArgs e) in C:\Websites\IwiSystem\Source\mojoportal\Web\Admin\ManageUsers.aspx.cs:532
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

3/31/2012 7:10:12 AM
Gravatar
Total Posts 18439

Re: New User Bugging Out

Invalid object name 'Member'

We don't have any such field or parameter on SiteUser nor in mp_Users table. All I can guess that somewhere along the way you forked the code or modified the stored procedure mp_Users_Update. My version of it has no such parameter or database field 'Member' involved. I can't really think of any other explanation for this stack trace. Or maybe you have some update trigger that you've added to the table that is failing?

4/3/2012 12:25:15 AM
Gravatar
Total Posts 26

Re: New User Bugging Out

You were right, a trigger I put on the table a while back, I feel a bit sheepish, thanks for the help, I have thrown some beers your way!

4/4/2012 7:43:30 AM
Gravatar
Total Posts 18439

Re: New User Bugging Out

Many thanks for the beers! Glad you got it working.

Cheers,

Joe

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