Apostrophe in member group breaks all protected nodes
Hi,
I see this has been raised as a bug (http://issues.umbraco.org/issue/U4-1285) but I'm trying to find out how to rectify the effects of this so that public access works again on my client's 4.7.1 site (currently there are YSOD's all over the place).
So basically they created a member group called O'Reily, assigned a couple of members to this group then password protected a content node to this group. It YSOD'd. Now when you try to view the member group node it YSOD's:
Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.presentation.members.EditMemberGroup.Page_Load(Object sender, EventArgs e) +566
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
umbraco.BasePages.BasePage.OnLoad(EventArgs e) +18
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
I unassigned the members from this group and tried to delete the group but that gives an error in the alert bubble bottom right:
Error handling action
Object reference not set to an instance of an object.
Similarly when you right click ANY content node that has member protection now it also errors:
Server Error in '/' Application.
'./group [@id='O'Reily']' has an invalid token.
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.Xml.XPath.XPathException: './group [@id='O'Reily']' has an invalid token.
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:
[XPathException: './group [@id='O'Reily']' has an invalid token.] MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t) +5123977
MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput) +92
MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) +412
MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) +21
MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) +80
MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) +62
MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) +27
MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) +41
MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) +29
MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) +29
MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) +27
MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean allowVar, Boolean allowKey) +91
System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) +53
System.Xml.XPath.XPathNavigator.Select(String xpath) +21
umbraco.cms.businesslogic.web.Access.IsProtectedByMembershipRole(Int32 documentId, String role) +317
umbraco.presentation.umbraco.dialogs.protectPage.Page_Load(Object sender, EventArgs e) +1521
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
umbraco.BasePages.BasePage.OnLoad(EventArgs e) +19
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
Can anyone advise how to get this working again to at least be able to remove the member group and try again with a new group without an apostrophe? I'm thinking it's probably a database hack.
Okay, so am I right in saying that member groups are stored in the umbracoNode table? If so, it is okay to rename the 'text' field for this member group (i.e. the name of the group) to remove the apostrophe manually directly in the database, or will this break things? I can't see how it would break things but thought it best to seek other opinions before doing it.
This is a very late in the day reply.. but for others who have a similar issue and stumble across this, I have found that just renaming the member group and removing the apostrophe before saving it will make it 'deletable' without having to go into the database. This certainly works for Umbraco 6.1.6
Apostrophe in member group breaks all protected nodes
Hi,
I see this has been raised as a bug (http://issues.umbraco.org/issue/U4-1285) but I'm trying to find out how to rectify the effects of this so that public access works again on my client's 4.7.1 site (currently there are YSOD's all over the place).
So basically they created a member group called O'Reily, assigned a couple of members to this group then password protected a content node to this group. It YSOD'd. Now when you try to view the member group node it YSOD's:
I unassigned the members from this group and tried to delete the group but that gives an error in the alert bubble bottom right:
Similarly when you right click ANY content node that has member protection now it also errors:
Can anyone advise how to get this working again to at least be able to remove the member group and try again with a new group without an apostrophe? I'm thinking it's probably a database hack.
Thanks for any pointers folks.
Okay, so am I right in saying that member groups are stored in the umbracoNode table? If so, it is okay to rename the 'text' field for this member group (i.e. the name of the group) to remove the apostrophe manually directly in the database, or will this break things? I can't see how it would break things but thought it best to seek other opinions before doing it.
To wrap this up, I edited the text field for the afflicted node in the database manually and it's done the job.
This is a very late in the day reply.. but for others who have a similar issue and stumble across this, I have found that just renaming the member group and removing the apostrophe before saving it will make it 'deletable' without having to go into the database. This certainly works for Umbraco 6.1.6
May help someone..
is working on a reply...