After upgrading from 7.6.2 to 7.6.3 I get this error: String "1705" is not a valid udi. I have EnablePropertyValueConverters set to true in both 7.6.2 and 7.6.3. My Partial View Macro:
@page.imgPanel.Url didn't work. I'm using the Media Picker property editor. I have tried both the obsolete editor and the new one (version 2), without luck.
Double check all the child nodes to ensure they have an Image selected.
I'm guessing your code is passing true on
if (page.HasValue("imgPanel")) {
You may want to put in an extra NULL check as well
if (page.imgPanel != null) {
Ensure you are using 7.6.3, and set EnablePropertyValueConverters to true, and use the "version2" media type, and resave all your startPage.children nodes.
And republish the entire site, to clear out the XML cache
I have the same problem. Is there a way to save each node in one step or automatically, without opening and saving each node? Because I have a lot of nodes to save and just publishing all doesn't work.
Was hoping that this issue resolved this, as the republishing any and all pages where we need to alter from the legacy to the new media picker is time consuming on large sites.. Also if a page is in an editing cycle, we can't publish the previous version again to generate the UDI :-(
I did a migration for news articles. There was thousands of articles and its not possible to resave and publish all the content. Your solution saved that time.
Hello Guys i have the same problem
and its not possible to resave and publish all the content because site have a thousands of content. i tested the below code and it didn't do the job.
var cs = ApplicationContext.Current.Services.ContentService;
foreach(var content in yourListOfContentItems)
{
cs.SaveAndPublish(content);
}
Hello, I have a similar problem, I try to programmatically add a picture to the media picker and publish the whole content. The special thing is that it shows the images in backofice. The error is not a valid udi at the frontend.
My code is:
I am populating a image on one of my doc types in code and saving. Using a value from an already existing image.
If I pass in the ID and save it saves ok. When I look in the backend I can see the image and all looks good. When I try and access this in the frontend I get the not a valid UDI.
So if I pass the UDI in when saving the image again its saves fine. But when I look in the backend it doesn't display the image but instead a message saying the image doesn't exist and something about deleted image. It also wont let me navigate to the image in the backend. The strange think is when I try and access this image in the frontend it works fine.
This is the code I am using to access the image in the frontend
String "nnnn" is not a valid udi
After upgrading from 7.6.2 to 7.6.3 I get this error: String "1705" is not a valid udi. I have EnablePropertyValueConverters set to true in both 7.6.2 and 7.6.3. My Partial View Macro:
The error comes from "@Umbraco.Media(page.imgPanel).Url" inside the img tag, because when commenting this row, the code works. Any ideas?
Have you tried just...
What kind of property editor are you using for "imgPanel" ?
@page.imgPanel.Url didn't work. I'm using the Media Picker property editor. I have tried both the obsolete editor and the new one (version 2), without luck.
Double check all the child nodes to ensure they have an Image selected.
I'm guessing your code is passing true on
You may want to put in an extra NULL check as well
Ensure you are using 7.6.3, and set EnablePropertyValueConverters to true, and use the "version2" media type, and resave all your startPage.children nodes.
And republish the entire site, to clear out the XML cache
Resaving all my startPage.children nodes and republish the entire site did the trick. Thank you!
Hi.
I have the same problem. Is there a way to save each node in one step or automatically, without opening and saving each node? Because I have a lot of nodes to save and just publishing all doesn't work.
Was hoping that this issue resolved this, as the republishing any and all pages where we need to alter from the legacy to the new media picker is time consuming on large sites.. Also if a page is in an editing cycle, we can't publish the previous version again to generate the UDI :-(
http://issues.umbraco.org/issue/U4-9974
"Plus the media picker is missing a check for the obsolete media picker."
The source to Object convertor only supports UDI's so no go for legacy ints..
we could do with a fallback to the
https://github.com/Jeavon/Umbraco-Core-Property-Value-Converters/blob/v3/Our.Umbraco.PropertyConverters/MediaPickerPropertyConverter.cs
simple workaround...
Hi Mike,
Thanks. This helped for my issue. A good work around.
Kind Regards David
Hi Mike,
Works for me.
I did a migration for news articles. There was thousands of articles and its not possible to resave and publish all the content. Your solution saved that time.
Thanks for your trick.
Hello Guys i have the same problem
and its not possible to resave and publish all the content because site have a thousands of content. i tested the below code and it didn't do the job.
Started another thread on this as this one seemed a little dead..
My take on sorting...
https://our.umbraco.org/forum/using-umbraco-and-getting-started/86315-update-to-7623-and-core-property-value-convertors-id-to-uid-aka-mediapicker-to-mediapicker2#comment-273516
Hello, I have a similar problem, I try to programmatically add a picture to the media picker and publish the whole content. The special thing is that it shows the images in backofice. The error is not a valid udi at the frontend. My code is:
template:
But here:var typedMediaPickerSingle = item.GetPropertyValue
possibly this line..
you need to set the value to the udi not the id...
untested but I've used a similar approach here...
https://our.umbraco.org/forum/using-umbraco-and-getting-started/86315-update-to-7623-and-core-property-value-convertors-id-to-uid-aka-mediapicker-to-mediapicker2#comment-273516
This works well. Thank you very much for your advice I've edited the template:
This works well. Thank you very much for your advice I've edited the template:
Hey Guys,
I get the same issue.
I am populating a image on one of my doc types in code and saving. Using a value from an already existing image.
If I pass in the ID and save it saves ok. When I look in the backend I can see the image and all looks good. When I try and access this in the frontend I get the not a valid UDI.
So if I pass the UDI in when saving the image again its saves fine. But when I look in the backend it doesn't display the image but instead a message saying the image doesn't exist and something about deleted image. It also wont let me navigate to the image in the backend. The strange think is when I try and access this image in the frontend it works fine.
This is the code I am using to access the image in the frontend
I have exactly the same issue, does anyone know if this is a bug?
edit: Found the solution is not to build the udi as a string.
Found the solution is not to build the udi as a string
or
My post here might help
is working on a reply...