I am having some trouble with the umbraco.library.GetMember() method in my XSLT for umbraco version 4.5.2 . I've check the bugs and the forum and while it appears that other people have experienced something similar to this before none of the suggestions have worked and all of the related bugs are marked as fixed. I can only assume I'm missing something.
Here is the XSLT in question: (I've pruned out the markup and anything not related to GetMember for clarity).
It's the last line I'm having trouble with - it basically return nothing. I have tried the following variations on this, just in case, all with the same result:
While I admit most of these variations aren't logical, I was getting a bit desperate so I tried everything I could think of. I know the data is present however, since the "copy-of" commad in the first code set produces the following xml output (I've cleared out some of the information like my personal email address etc from this, but the format remains the same).
Anyway at this point I am completely unsure how to get what I need out of the system, as far I can one of those original permutations of the value-of section should of worked. since they didn't, and the data is clearly present, I would appreciate any advice on what I am missing or where to go next.
So I tried using the disable-output-escaping="yes" in the XSLT in the appropriate place and this did not work either. Thanks for the suggestion however.
I copied your code and put it into my installation and I thought that: <xsl:value-ofselect="$member/node/fullname"/> would work but it doesn't but it does work for me with disable-output-escaping="yes" on the value of the fullname (I happened to use lastname as the property type alias name).
Well, I did eventually get it to work. It wouldn't work for me until I had republished the whole site and then deleted the umbraco.config file. I can only assume that somehow there was something wierd going on with the cache that was causing the problem. (Maybe all those bad or empty queries I had tried had magically gotten some bad data cached?). Anyway, once I deleted the config file and reloaded the page it was working as expected with the correct notation.
It's always a good idea to right click "Content" and choose "Republish entire site". This refreshes the XML cache so it should not be neccesary to delete it. But sometimes one just needs to go the hard way. Just thought I would mention this if you were not aware about it. And happy to see you have got it to work :-)
Problem with umbraco.library.GetMember($id)
Hi,
I am having some trouble with the umbraco.library.GetMember() method in my XSLT for umbraco version 4.5.2 . I've check the bugs and the forum and while it appears that other people have experienced something similar to this before none of the suggestions have worked and all of the related bugs are marked as fixed. I can only assume I'm missing something.
Here is the XSLT in question: (I've pruned out the markup and anything not related to GetMember for clarity).
It's the last line I'm having trouble with - it basically return nothing. I have tried the following variations on this, just in case, all with the same result:
While I admit most of these variations aren't logical, I was getting a bit desperate so I tried everything I could think of. I know the data is present however, since the "copy-of" commad in the first code set produces the following xml output (I've cleared out some of the information like my personal email address etc from this, but the format remains the same).
Anyway at this point I am completely unsure how to get what I need out of the system, as far I can one of those original permutations of the value-of section should of worked. since they didn't, and the data is clearly present, I would appreciate any advice on what I am missing or where to go next.
Since it is XML still inside of full name, you need to disable output escaping:
<xsl:value-of disable-output-escaping="yes" select="$member/node/lastname" />
Hi,
So I tried using the disable-output-escaping="yes" in the XSLT in the appropriate place and this did not work either. Thanks for the suggestion however.
Hi Gene
This code should for sure work on an installation out of the box, and from the XML that you provided above:
But if nothing is rendered, could you try this:
Just to check.
/Kim A
I copied your code and put it into my installation and I thought that: <xsl:value-of select="$member/node/fullname" /> would work but it doesn't but it does work for me with disable-output-escaping="yes" on the value of the fullname (I happened to use lastname as the property type alias name).
Hmm... You shouldn't have to use the disable-output-escaping, to make this work as it's just plain text inside the <fullname></fullname>.
I also tried the code in a fresh new installed v4.6, and it's work just like a charm with just:
Where the fullname is a textstring.
/Kim A
Well, I did eventually get it to work. It wouldn't work for me until I had republished the whole site and then deleted the umbraco.config file. I can only assume that somehow there was something wierd going on with the cache that was causing the problem. (Maybe all those bad or empty queries I had tried had magically gotten some bad data cached?). Anyway, once I deleted the config file and reloaded the page it was working as expected with the correct notation.
Thanks for the help!
Hi Gene
It's always a good idea to right click "Content" and choose "Republish entire site". This refreshes the XML cache so it should not be neccesary to delete it. But sometimes one just needs to go the hard way. Just thought I would mention this if you were not aware about it. And happy to see you have got it to work :-)
/Jan
Ahh, did you maybe play around with the "UseLegacyXmlSchema" in the umbracoSettings.config-file? I'm just curious :)
But great that you got it working Gene. Couldn't quite understand why it didn't work :)
/Kim A
is working on a reply...