Upgrade 4.5 to 4.5.1 causes CWS email-a-friend to break
I had a site running Umbraco 4.5 (.NET 4.0) with Warren Buckley's CWS 2.0.3 package installed and running fine.
Today, I upgraded to Umbraco 4.5.1 and everything works as before except for the email-a-friend link. If I click on the email this page to a friend link in the browser I get this error:
**********
No umbraco document matches the url 'http://localhost/email-a-friend/1080.aspx'
umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "email-a-friend"]/* [@urlName = "1080"] | /root/* [@urlName = "1080"]')
**********
If I try to link to document from the properties tab of the content page while logged in as admin, I get this error:
**********
Key cannot be null. Parameter name: key
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.ArgumentNullException: Key cannot be null. Parameter name: key
Source Error:
Line 179: */
Line 180:
Line 181: string strCheckForNode = umbraco.library.QueryForNode(strNodeID);
Line 182:
Line 183: if (strCheckForNode == string.Empty)
not sure if this has been answered, but you just need to change the line in the EmailAFriendLink.xslt from :<xsl:variable name="link" select="concat('/email-a-friend/', $currentPageID,'.aspx')"/> to: <xsl:variable name="link" select="concat('/email-a-friend.aspx?nodeID=', $currentPageID)"/>
Upgrade 4.5 to 4.5.1 causes CWS email-a-friend to break
I had a site running Umbraco 4.5 (.NET 4.0) with Warren Buckley's CWS 2.0.3 package installed and running fine.
Today, I upgraded to Umbraco 4.5.1 and everything works as before except for the email-a-friend link. If I click on the email this page to a friend link in the browser I get this error:
**********
No umbraco document matches the url 'http://localhost/email-a-friend/1080.aspx'
umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "email-a-friend"]/* [@urlName = "1080"] | /root/* [@urlName = "1080"]')
**********
Key cannot be null.
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.Parameter name: key
Exception Details: System.ArgumentNullException: Key cannot be null.
Parameter name: key
Source Error:
Line 179: */ Line 180: Line 181: string strCheckForNode = umbraco.library.QueryForNode(strNodeID); Line 182: Line 183: if (strCheckForNode == string.Empty)
Source File: d:\dev\umbraco-451\cws\usercontrols\website\EmailAFriendForm.ascx.cs Line: 181
If I use the link http://localhost/email-a-friend/1080.aspx then I get the error No umbraco document matches the url.
However, if I manually specify the nodeID in the link, http://localhost/email-a-friend.aspx?nodeID=1080 , then the page is served with no errors.
I'm still not sure how to fix this, so any help is appreciated.
Thanks.
not sure if this has been answered, but you just need to change the line in the EmailAFriendLink.xslt from :<xsl:variable name="link" select="concat('/email-a-friend/', $currentPageID,'.aspx')"/>
to: <xsl:variable name="link" select="concat('/email-a-friend.aspx?nodeID=', $currentPageID)"/>
is working on a reply...