Umbraco n00b here, so appologies in advance for sounding dumb. I can only assume the issue is my cache, but no matter what I do to clear it, I still get the following issue.
I seem to have a very tricky issue in relation what browser I'm using, and the result of the "GetCurrentMember()" function in XLST.
I have success if I view the site in (these are all running on a Vista box)
Chrome
IE9
Firefox 5
However if I boot up my XP box and test the site, It fails when viewing in
IE7
Firefox 4
I have searched the forums, but I have not found anything that matches my problem as yet. My problem is creating an XLST Macro using the following code:
You're right - XSLT is serverside, so the issue is bound to be somehow related to cookies. The error you're getting basically means that the browser has no session for a member, so whichever Member login method you're using fails in those browsers.
Browser specific issues for GetCurrentMember()
Hi all,
Umbraco n00b here, so appologies in advance for sounding dumb. I can only assume the issue is my cache, but no matter what I do to clear it, I still get the following issue.
I seem to have a very tricky issue in relation what browser I'm using, and the result of the "GetCurrentMember()" function in XLST.
I have success if I view the site in (these are all running on a Vista box)
I have searched the forums, but I have not found anything that matches my problem as yet. My problem is creating an XLST Macro using the following code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="currentMemberName" select="umbraco.library:GetCurrentMember()" />
<xsl:template match="/">
<xsl:value-of select="$currentMemberName/@nodeName" />
</xsl:template>
</xsl:stylesheet>
This macro works fine in the working browsers returing the expected result "Example Member", but if I in any other browser I get no result.
I changed the code to output the XML by using the following line:
<xsl:copy-of select="$currentMemberName" />
When viewing source on the non-working browsers I get the following XML output:
<error>No current member exists (best practice is to validate with 'isloggedon()' prior to this call)</error>
As XSLT is server side (am I right here) there shouldnt be any issue caused by the browser I am viewing it in should there?
Thanks for your help,
Matt
Hi Matt,
You're right - XSLT is serverside, so the issue is bound to be somehow related to cookies. The error you're getting basically means that the browser has no session for a member, so whichever Member login method you're using fails in those browsers.
/Chriztian
Thank you for your reply :) I'll check out the cookie issue.
I would "High five" your answer, but I dont have any Kama points yet.
No worries, Matt - most of us are here to help; not for the Karma :-)
/Chriztian
is working on a reply...