What's the actual error you're getting? Are you sometimes getting a broken image? Or is it displaying an error message? Is the XSLT Macro being cached?
Wierd! I've sometimes had problems with images disappearing on macros that were cached, but your caching settings look fine. I'm not really sure what the issue could be. If you have access to the server logs, you could have a look and see if there are any errors relating to the images that aren't displaying?
Yeah it is a strange one. I may turn off cacheing all together to see if that fixes the issue.
Quiet simply when I request an image it will show. If I then refresh there is a chance the image will dissapear. I'll come back an hour later and theres a chance it will be displaying :S
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
In the log :S I dont know if this affects images though
Also a few:
At /media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/3.jpg (Referred by: http://www.test.com/):
It could be to do with the media cache? That gets rebuilt when you republish the site I think. Maybe that's getting corrupted somehow, or lost. If you set up a clean install of Umbraco on the same box, does it display the same behaviour?
Image cach/load inconsistency
Hi,
I am using this code to show an image within a template using XSLT
<xsl:value-of select="umbraco.library:GetMedia($currentPage/backgroundImage, 0)/umbracoFile"/>
The strange thing is this works sometimes and others not. Seems totally random.
I am using umbraco 4.7 on a windows 2008 box.
Any help would be much appreciated.
Thanks
Scott
What's the actual error you're getting? Are you sometimes getting a broken image? Or is it displaying an error message? Is the XSLT Macro being cached?
Hi Tim,
I get no error. Simply some times it shows but a few times it doesnt. When I then republish the site its fine.
Here are my cache details:
Cache Period: 0
Cache By Page: Yes
Cache Personalized: No
Just the defaults I think.
Does the cache by page make a difference to the get image?
Thanks
Scott
Wierd! I've sometimes had problems with images disappearing on macros that were cached, but your caching settings look fine. I'm not really sure what the issue could be. If you have access to the server logs, you could have a look and see if there are any errors relating to the images that aren't displaying?
Yeah it is a strange one. I may turn off cacheing all together to see if that fixes the issue.
Quiet simply when I request an image it will show. If I then refresh there is a chance the image will dissapear. I'll come back an hour later and theres a chance it will be displaying :S
S
It might be worth having a look in the umbracoLog table and see if anything is in there relating to the images?
I have quiet alot of:
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
In the log :S I dont know if this affects images though
Also a few:
At /media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/www.test.com/media/1346/3.jpg (Referred by: http://www.test.com/):
Thanks
Scott
Hmm, looking at the log, it looks like the media is requesting the wrong URL? I can't see anything wrong with your XSLT though.......
Just realised I never have this probelm when accessing content/media via C# :s
Is my media file / umbraco content file getting corrupted?
Everytime I republish the site I see the image again! :S
Any help would be much appreciated.
S
It could be to do with the media cache? That gets rebuilt when you republish the site I think. Maybe that's getting corrupted somehow, or lost. If you set up a clean install of Umbraco on the same box, does it display the same behaviour?
Ok,
I think I have solved the probelm.
Before I was using umbraco.library:GetMedia($inspireNode/hotelThumbNailImage, 0)/umbracoFile
And now I am using umbraco.library:GetMedia($inspireNode/hotelThumbNailImage, '0')/umbracoFile - notcie the quotes around the '0'
Why would this have a knock on affect sometimes and not others?
Cheers
Scott
That's very odd! I'd log that as a bug on Codeplex: http://umbraco.codeplex.com/workitem/list/basic
:)
is working on a reply...