If I view the page in the Umbraco back office I can see that the media item has been allocated to it however if I then attempt to view the page on the website that uses that media item I get a
String "nnnn" is not a valid udi
exception thrown when attempting to work with the page's model property e.g.
string logoUrl = clubHomePage.ClubLogo.Url;
If I go back into the Umbraco Back Office and physically Save and Publish the page everything works fine but I can't rely on that as users of the site don't have access to the back office.
Why? Well in v7.6.0 UDIs were introduced along with a whole bunch of "2" suffixed pickers and it appears as though the UDI needs to be used over the old Id when working with pickers.
ContentService SaveAndPublish Not Updating Cache for Media Picker Items?
Hi,
I've got a scenario where I can upload an image from the front end website which then gets allocated to a piece of content as below:
If I view the page in the Umbraco back office I can see that the media item has been allocated to it however if I then attempt to view the page on the website that uses that media item I get a
exception thrown when attempting to work with the page's model property e.g.
If I go back into the Umbraco Back Office and physically Save and Publish the page everything works fine but I can't rely on that as users of the site don't have access to the back office.
Advice very much appreciated.
Okay I've found out what I need to do to get this to work. I've had to change the code to:
Why? Well in v7.6.0 UDIs were introduced along with a whole bunch of "2" suffixed pickers and it appears as though the UDI needs to be used over the old Id when working with pickers.
is working on a reply...