We have moved to GitHub Issues
Created by Carlos Mosqueda 05 Dec 2012, 20:47:05 Updated by Carlos Mosqueda 28 Dec 2012, 20:37:08
We updated our website from 18.104.22.168 to 4.9.0 then to 4.9.1. There seems to be a random issue with images not showing up via Macros using XSLT files. We have a few items that still use XSLT to render content, and it seems that the call to the Media is randomly not working. We republish the nodes and the sometimes brings them back, but most of the time they don't show back up. I saw there was a umbraco.dll fix for inline XSLT but was unsure if there was another issue with the XSLT way of getting images or the umbraco.library:GetMedia call? This is our call to the media: <xsl:variable name="imgPath" select="umbraco.library:GetMedia(landingPageImage,'false')/umbracoFile" />
This has happened in the past when we upgradee to 4.7 from 4.5. We are using a the umbraco.library:GetRandom()to pull our nodes for random cross promotions on each page. The images are randomly not showing up, but the other properties are working perfectly fine. The only issue that it seems to be with its the umbraco.library:GetMedia in XSLT.
The issue can be seen on our mobile website http://www.dmns.org/imax/current-films/mobile which is using XSLT to render out our mobile layout. We have a default image showing right now (the black image) but there are supposed to be other images showing up. Just take off the /mobile and you will see the normal site's images.
Just checking back on this. Are there any thoughts?
Would there be an issue if the name of the .jpg file has spaces in it and the XSLT is not handling the spaces? I am not sure but I thought the images got pulled by ID but I may be wrong.
Have you checked to see the format of the XML has changed since the upgrade? (If I remember correctly it should'nt have though - I recently did an upgrade from 4.7.x to 4.9.1 not seeing any issues like this).
Also you should use either 0, 1, false() or true() as the second parameter. Right now the expression evaluates to true since the extension is getting a string. So to achieve what you really want you should write the following: <xsl:variable name="imgPath" select="umbraco.library:GetMedia(landingPageImage,0)/umbracoFile" />
Hope this input helps.
Well Jan, that actually may have fixed out issue. I am going to let it bake for a few days to see if anything goes awry. I also had ImageGen trying to process the images on them too. Probably not what was causing the issue, but we opted not to use ImageGen before for the shear amount of images we had loading on one page and the processing of the images with ImageGen seemed to slow or conflict with something too. Either way, your answer worked using '0' instead of 'false'.
Be aware that the value entered as the second parameter should be without the '' around it. Otherwise it will be seen as a string instead of a boolean :)
But sounds good it may have fixed it.
Regarding ImageGen you should also be aware that the placement of the handler has changed in the latest version if I remember correctly. Don't know if that helps you in anyway.
On a final note I will recommend that you upgrade Umbraco to the latest version since there are some annyoing bugs with this version. For instance the emptying of the recycle bin does not work and there is an annoying issue with using the rollback function too.
Jan, Thanks for the advice and the heads up. We knew about the recycle bin issue. I think there was some DLL fix that we got that fixed that quick. Was not sure about the roll back issue. One more question. We have an issue with our slideshows. The way we are getting a list of images is as follows. <xsl:for-each select="umbraco.library:GetMedia(umbraco.library:GetXmlNodeCurrent()/slideshowMediaFolder, 'true')/descendant-or-self::*[@nodeTypeAlias='Image']"> </xsl:for-each>
Is this way still correct? Or has this changed too. I tried changing the 'true' to a 1 instead but that didn't seem to work either. Thoughts?
I think it's most appropiate if we keep the discussion going on at http://www.our.umbraco.org since the issue tracker really only should be used for discussing bugs.
So if you don't mind asking the above question in there instead? :)
Yep no problem will do. Thanks for the advice on here. Will mark bug as solved.
Backwards Compatible: True
Fix Submitted: None
Affected versions: 4.9.0, 4.9.1
Due in version: