4.0.3 - Problem editing a member (IsUserInRole SQL helper exception in ExecuteScalar)
Hello,
I'm currently getting the following error when I click to edit a member via the Members tab in Umbraco 4.0.3, has anyone had this before, do you know how to fix it?
Stack trace: at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:line 198 at umbraco.cms.businesslogic.member.MemberGroup.HasMember(Int32 memberId) at umbraco.providers.members.UmbracoRoleProvider.IsUserInRole(String username, String roleName) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\providers\members\MembersRoleProvider.cs:line 214 at System.Web.Security.Roles.IsUserInRole(String username, String roleName) at umbraco.cms.presentation.members.EditMember.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at umbraco.BasePages.BasePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I don't have the source, I just downloaded and used the compiled version.
Alright, well ExecuteScalar is pretty simple, so there's probably something wrong with the parameters. You should check the cmsMember database for anything that could throw it of it's game. Also not that in cmsPropertyData, the properties for the members are stored.
If you get this error it's because on line 126 of umbraco.cms businesslogic\member\MemberGroup.cs there is a parameter called @membergroup in the CommandText string, but line 128 is looking for @memberGroup (note the capital G).
Change one so it's the same as the other, compile, upload and bang... works.
4.0.3 - Problem editing a member (IsUserInRole SQL helper exception in ExecuteScalar)
Hello,
I'm currently getting the following error when I click to edit a member via the Members tab in Umbraco 4.0.3, has anyone had this before, do you know how to fix it?
I don't have the source, I just downloaded and used the compiled version.
Let me know if you need any additionald details.
Cheers,
Greg.
Do you happen to be using MySQL?
Sorry, should have mentioned, it's SQL Server 2005.
Greg.
Alright, well ExecuteScalar is pretty simple, so there's probably something wrong with the parameters. You should check the cmsMember database for anything that could throw it of it's game. Also not that in cmsPropertyData, the properties for the members are stored.
OK, I have some more details. Now I'm getting the following error when Umbraco is calling umbraco.cms.businesslogic.member.MemberGroup.HasMember:
So why would I suddenly not be sending in the membergroup (which is base.Id (base being CMSNode) in the code)? This was working :S
Greg.
OK, well that was a fun one to find!
If you get this error it's because on line 126 of umbraco.cms businesslogic\member\MemberGroup.cs there is a parameter called @membergroup in the CommandText string, but line 128 is looking for @memberGroup (note the capital G).
Change one so it's the same as the other, compile, upload and bang... works.
Or it should do :) It works for me.
Cheers,
Greg.
is working on a reply...