I'm about to use members for the first time. I've installed the "Umbraco Member Controls" package, and now, whenever I access a member in the Members tree, I get the following error:
Any ideas/help would be great, thanks!
umbraco v
4.0.1 (Assembly version: 1.0.3373.718), asp.net version 2, Windows 2003 Web Ed.
Bit strange... it shouldn't happen... can you try to de-install the package (from the 'Developer' section, find the 'Installed Packages' node, expand, find the package you're referring to, click on node and click button to uninstall and see whether that changes something in the member section.
Btw, any v4+ version natively supports the asp.net membership, so I'd recommend to use those over the existing umbraco member control package from the repository. Also, I'd install the latest stable version which is v4.0.2.1 (it can be easily installed using the web platform installer)
Well, the site has been upgraded to the lastest version, and I'm still getting the error!
[SqlException (0x80131904): Must declare the scalar variable "@membergroup".]
Looking in the source, this method is the one causing the problem:
public bool HasMember(int memberId) { return SqlHelper.ExecuteScalar<int>("select count(member) from cmsMember2MemberGroup where member = @member and memberGroup = @membergroup", SqlHelper.CreateParameter("@member", memberId), SqlHelper.CreateParameter("@memberGroup", Id)) > 0; }
No idea how it can't have @membergroup defined, unless it's because it's null or something?!
This happens after I've created the first member group. When I delete the membergroup(s) again, the problem goes away! But then it's kind of hard making rolebased protection.
Well, seems the hosting partner had "case sensitive" on the server, but "case insensitive" on the database, after moving the database to a server with "case insensitive" the problem was solved. Go figure!
Must declare the scalar variable "@membergroup".
I'm about to use members for the first time. I've installed the "Umbraco Member Controls" package, and now, whenever I access a member in the Members tree, I get the following error:
Any ideas/help would be great, thanks!
umbraco v 4.0.1 (Assembly version: 1.0.3373.718), asp.net version 2, Windows 2003 Web Ed.
Stack Trace:
[SqlException (0x80131904): Must declare the scalar variable "@membergroup".]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
System.Data.SqlClient.SqlDataReader.get_MetaData() +83
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
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.ExecuteScalar() +139
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +56
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +83
umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 4.0\umbraco\datalayer\SqlHelpers\SqlServer\SqlServerHelper.cs:51
umbraco.DataLayer.SqlHelper`1.ExecuteScalar(String commandText, IParameter[] parameters) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 4.0\umbraco\datalayer\SqlHelper.cs:194
[SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteScalar]
umbraco.DataLayer.SqlHelper`1.ExecuteScalar(String commandText, IParameter[] parameters) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 4.0\umbraco\datalayer\SqlHelper.cs:198
umbraco.cms.businesslogic.member.MemberGroup.HasMember(Int32 memberId) +172
umbraco.providers.members.UmbracoRoleProvider.IsUserInRole(String username, String roleName) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 4.0\umbraco\providers\members\MembersRoleProvider.cs:214
System.Web.Security.Roles.IsUserInRole(String username, String roleName) +398
umbraco.cms.presentation.members.EditMember.Page_Load(Object sender, EventArgs e) +1349
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Hi Steen,
Bit strange... it shouldn't happen... can you try to de-install the package (from the 'Developer' section, find the 'Installed Packages' node, expand, find the package you're referring to, click on node and click button to uninstall and see whether that changes something in the member section.
Btw, any v4+ version natively supports the asp.net membership, so I'd recommend to use those over the existing umbraco member control package from the repository. Also, I'd install the latest stable version which is v4.0.2.1 (it can be easily installed using the web platform installer)
Cheers,
/Dirk
Okay, I uninstalled the package, and then installed it again.
Same problem.
Unfortunantely I don't have access to the server, so I guess I'm stuck with the version I've got.
Thanks,
Steen
Well, the site has been upgraded to the lastest version, and I'm still getting the error!
[SqlException (0x80131904): Must declare the scalar variable "@membergroup".]
Looking in the source, this method is the one causing the problem:
public bool HasMember(int memberId) {
return SqlHelper.ExecuteScalar<int>("select count(member) from cmsMember2MemberGroup where member = @member and memberGroup = @membergroup",
SqlHelper.CreateParameter("@member", memberId),
SqlHelper.CreateParameter("@memberGroup", Id)) > 0;
}
No idea how it can't have @membergroup defined, unless it's because it's null or something?!
Any ideas?
This happens after I've created the first member group. When I delete the membergroup(s) again, the problem goes away! But then it's kind of hard making rolebased protection.
Steen,
Latest version? which one is that? v4.0.2.1 or the v4.1? One thing I notice (unless you've made a typo) is that there's a casing problem?
whereas the name of the parameter created is
membergroup vs memberGroup
Not much for a solution, but may help identifying?
Cheers,
/Dirk
That would be v4.0.2.1
The memberGroup vs membergroup issue, that would only be a problem if the SQL server is setup with case sensitivity ?
Well, time to ask some questions with my hosting partner.
Thanks,
Steen
Well, seems the hosting partner had "case sensitive" on the server, but "case insensitive" on the database, after moving the database to a server with "case insensitive" the problem was solved. Go figure!
Thanks,
Steen
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.