I am not sure this is the correct forum, but I got no answers in the UI forum.
I am running Umbraco v 4.0.3 (Assembly version: 1.0.3674.221). When I check the "Member can edit" or "Show on profile" checkboxes and save the membertype the membertype is saved but the tics in the checkboxes are gone. I have tried to manually edit the values in the database table "CMSMEMBERTYPE" but the boxes are not checked eventhough I changed the values from 0 to 1 in the databse. I have reproduced the error in another umbraco installation using umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657) where also the membership controls package is installed. The problem persists in both Chrome and IE8.
How do I get umbraco to save the "Member can edit" checkbox values?
I think i have located the problem. In the MemberType.cs in the umbraco source code i think this:
public bool MemberCanEdit(propertytype.PropertyType pt) { if(propertyTypeRegistered(pt)) { return (SqlHelper.ExecuteScalar<bool>("Select memberCanEdit from cmsMemberType where NodeId = " + this.Id +" And propertytypeId = "+pt.Id)); } return false; }
Should be changed to
public bool MemberCanEdit(propertytype.PropertyType pt) { if(propertyTypeRegistered(pt)) { return Convert.ToBoolean(SqlHelper.ExecuteScalar<int>("Select memberCanEdit from cmsMemberType where NodeId = " + this.Id +" And propertytypeId = "+pt.Id)); } return false; }
I am not sure that this is the most correct way to do this, but the problem with the original code is <bool> in the ExecuteScalar since the data is stored as a number.
How do I pass on this information to the umbraco team?
Forgot to add that this only solves the problem that even if the memberCanEdit value is changed directly in the database it would still not be shown correctly in umbraco.
I fixed this bug by downloading the umbraco source code, fixed the buggy code, recompiled Umbraco and uploaded a new version of cms.dll to my bin folder.
When I compiled Umbraco I got a lot of errors, which I fix solely due to a great forum post on how to fix errors when compiling Umbraco
Please feel free to download the fixed version of cms.dll, where the memberCanEdit and viewOnProfile are properly saved.
"Member can edit" checkbox value is not saved
Hi
I am not sure this is the correct forum, but I got no answers in the UI forum.
I am running Umbraco v 4.0.3 (Assembly version: 1.0.3674.221). When I check the "Member can edit" or "Show on profile" checkboxes and save the membertype the membertype is saved but the tics in the checkboxes are gone. I have tried to manually edit the values in the database table "CMSMEMBERTYPE" but the boxes are not checked eventhough I changed the values from 0 to 1 in the databse. I have reproduced the error in another umbraco installation using umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657) where also the membership controls package is installed. The problem persists in both Chrome and IE8.
How do I get umbraco to save the "Member can edit" checkbox values?
Regards Tarrild
Hi Christian,
Just checked it on a v4021 install and indeed doesn't save the checkbox values! Can you report on Codeplex if not yet reported?
TIA,
/Dirk
Hi Dirk
Added an item on Codeplex: http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=26712
Christian
Hi
I think i have located the problem. In the MemberType.cs in the umbraco source code i think this:
Should be changed to
I am not sure that this is the most correct way to do this, but the problem with the original code is <bool> in the ExecuteScalar since the data is stored as a number.
How do I pass on this information to the umbraco team?
Can I change this my self and recompile umbraco?
/Tarrild
Forgot to add that this only solves the problem that even if the memberCanEdit value is changed directly in the database it would still not be shown correctly in umbraco.
Tarrild
I fixed this bug by downloading the umbraco source code, fixed the buggy code, recompiled Umbraco and uploaded a new version of cms.dll to my bin folder.
When I compiled Umbraco I got a lot of errors, which I fix solely due to a great forum post on how to fix errors when compiling Umbraco
Please feel free to download the fixed version of cms.dll, where the memberCanEdit and viewOnProfile are properly saved.
See also the Issue reported at codeplex.
/Tarrild
is working on a reply...