XSLT doesn't return results untill I refresh the page?
I ran into this behavious with 4.5.2 today, where a page containing an XSLT macro only returned partial results, and then after I refreshed the page it showed the correct output.
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="1121"/> <xsl:template match="/"> <!-- The fun starts here --> <ul class="joboverview"> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:if test="count(current()/child::* [@isDoc]) > 0 "> <xsl:for-each select="./child::* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:if test="count(umbraco.library:GetXmlNodeById(1127)/* [@isDoc and relatedAirport= current()/@id ])"> <li class="joboverviewcountry"><h2>Aviapartner <xsl:value-of select="./../@nodeName"/>: <xsl:value-of select="@nodeName"/></h2> </li> <!-- use current nodeid to look in jobs where nodeid matches relatedAirport --> <ul> <xsl:for-each select="umbraco.library:GetXmlNodeById(1127)/* [@isDoc and relatedAirport= current()/@id and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(./@id)}"> <xsl:value-of select="./navTitle"/> </a> </li> </xsl:for-each> </ul> </xsl:if> </xsl:for-each> </xsl:if> </xsl:for-each> </ul> </xsl:template>
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="1121"/> <xsl:template match="/"> <xsl:variable name="querystring" select="umbraco.library:RequestQueryString('filter')"/>
<xsl:choose> <xsl:when test="umbraco.library:RequestQueryString('filter') != ''"> <!-- List only jobs for querystring --> Currently showing only jobs for <strong><xsl:value-of select="umbraco.library:RequestQueryString('filter')"/></strong>. <strong><a href="/en/jobs">View all jobs</a></strong>. <ul class="joboverview"> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1' and string(@nodeName) = $querystring]"> <xsl:if test="count(current()/child::* [@isDoc]) > 0 "> <xsl:for-each select="./child::* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:if test="count(umbraco.library:GetXmlNodeById(1127)/* [@isDoc and relatedAirport= current()/@id ])"> <li class="joboverviewcountry"><h2>Aviapartner <xsl:value-of select="./../@nodeName"/>: <xsl:value-of select="@nodeName"/></h2> </li> <!-- use current nodeid to look in jobs where nodeid matches relatedAirport --> <ul> <xsl:for-each select="umbraco.library:GetXmlNodeById(1127)/* [@isDoc and relatedAirport= current()/@id and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(./@id)}">
XSLT doesn't return results untill I refresh the page?
I ran into this behavious with 4.5.2 today, where a page containing an XSLT macro only returned partial results, and then after I refreshed the page it showed the correct output.
This is the output on first pageload:
This on second pageload:
Has anyone noticed such behaviour ? I quite dislike the idea of the visitors of the website running into blank pages ...
The xslt that doesn't always output:
I have this same problem, right now. It's bugging me. No pun intended. Did you ever figure this out?
it's been a very long time :p
don't quite remember how i fixed it, here is the current xslt for this macro:
is working on a reply...