I've just upgraded a site from 6.1.6 to 7.2. I was using some custom properties on the Image doc type, which still appear to have their values correctly populated in the back office.
However, front-end code reports the values of those properties as blank for 99% (but not all) of the images.
Sounds like your Examine indexes may have corrupted (as media uses Examine as a cache).
If you go into the developer section, you will find a Examine Management dashboard. In the Indexers section you can go to "Index info & tools" for each index and click "Rebuild index".
Thanks for your reply - unfortunately I'd tried that, but no luck. I can step through the code and see the properties exist, they're just empty for all but one image (for some reason).
I'd accidentally selected previous versions of the images without the custom properties. These old images were in the Recycle Bin in the Media section, hence why I was confused.
From my testing, it seems that:
1. Deleted media items still show up in multi-node tree picker fields and are retrieved by the content api as if they were not deleted.
2. When you add a media item to a multi-node property, the search function over the media library returns items from the Recycle Bin.
I can understand 1, but if I am right, 2 surely is a bug?
Ah, on 2 I would say yes but that it's not related to the item being in the multinode tree picker, it's just that binned media still show in the search. You can report the issue here.
On 1, one of the things my value converters package takes care of is this as it doesn't return deleted items from a multinode tree picker (they will show in the back office though). Of course it does a whole load of other stuff as well :)
Custom media properties in 7.2
I've just upgraded a site from 6.1.6 to 7.2. I was using some custom properties on the Image doc type, which still appear to have their values correctly populated in the back office.
However, front-end code reports the values of those properties as blank for 99% (but not all) of the images.
Anyone got any ideas?
Sounds like your Examine indexes may have corrupted (as media uses Examine as a cache).
If you go into the developer section, you will find a Examine Management dashboard. In the Indexers section you can go to "Index info & tools" for each index and click "Rebuild index".
Hope this gets those properties back.
Jeavon
Hi Jeavon,
Thanks for your reply - unfortunately I'd tried that, but no luck. I can step through the code and see the properties exist, they're just empty for all but one image (for some reason).
Anything else you can think of to try?
Thanks!
Hi Tom,
If you save a image do the properties appear?
Jeavon
Hi Jeavon,
I'm afraid not. I even created another custom property on the Image doctype, put some data in and saved, and even the new property comes back blank.
The index management area shows the fields as being in the index ok. BTW I'm on 7.2.1.
Thanks,
Tom
...and sure enough, if I try:
@umbraco.library.GetMedia(image.Id, false).Current.InnerXml
The properties I want are not in the Xml.
T
Hmm, what about as an experiment you use the media service?
e.g.
Righto, got to the bottom of it.
I'd accidentally selected previous versions of the images without the custom properties. These old images were in the Recycle Bin in the Media section, hence why I was confused.
From my testing, it seems that:
1. Deleted media items still show up in multi-node tree picker fields and are retrieved by the content api as if they were not deleted.
2. When you add a media item to a multi-node property, the search function over the media library returns items from the Recycle Bin.
I can understand 1, but if I am right, 2 surely is a bug?
Cheers,
Tom
Ah, on 2 I would say yes but that it's not related to the item being in the multinode tree picker, it's just that binned media still show in the search. You can report the issue here.
On 1, one of the things my value converters package takes care of is this as it doesn't return deleted items from a multinode tree picker (they will show in the back office though). Of course it does a whole load of other stuff as well :)
Anyhow very glad you got it sorted!
is working on a reply...