yesterday I was building my new web (Umbraco 6.0.5) and found a bug when writing my template. I want the logo of my site to be changable on the Home node, so I created a media picker property on my Frontpage document type with the Alias "logoImage". Somewhere in my template I had this:
This resulted in a YSOD (Exception Details: System.InvalidOperationException: The value of parameter 'id' must be either a string or an integer). When omitting the recursive:true, though, or switching to CurrentPage.logoImage, it works (well, as long as I don't open up a sub-page).
For the moment I found a workaround though, by adding a .ToString() to the Umbraco.Field, making it:
Wrong return type of Umbraco.Field when recursive:true
Arr mateys,
yesterday I was building my new web (Umbraco 6.0.5) and found a bug when writing my template. I want the logo of my site to be changable on the Home node, so I created a media picker property on my Frontpage document type with the Alias "logoImage". Somewhere in my template I had this:
This resulted in a YSOD (Exception Details: System.InvalidOperationException: The value of parameter 'id' must be either a string or an integer). When omitting the recursive:true, though, or switching to CurrentPage.logoImage, it works (well, as long as I don't open up a sub-page).
For the moment I found a workaround though, by adding a .ToString() to the Umbraco.Field, making it:
But of course this is not how it's supposed to be like :)
Jan
Please help, my recursive true in Umbraco 7.0 is not working. My case is :-
<div class="innerBannerWrap" style="background-image:url(@Umbraco.Media(@Umbraco.Field("industriesBgImage", recursive: true).ToString()).Url)">
is working on a reply...