We have moved to GitHub Issues
Created by Asbjørn Riis-Knudsen 20 Jun 2014, 22:28:10 Updated by Asbjørn Riis-Knudsen 26 Jun 2014, 07:01:19
Relates to: U4-4624
Original title: Cannot retrieve Imagecropper value on media item in 6.2
I updated a site to Umbraco 6.2.1 from Umbraco 6.1.6. Now, I cannot access my image crops - it simply returns an empty string instead of the expected Imagecropper XML. This has been reproduced in a blank Umbraco 6.2.1 site. I then downgraded the site to 6.1.6 (copied over bin folder and modified web.config). Immediately, I got a value back from the cropper. So the value is stored correctly, but not retrived correctly in 6.2.x. Other custom properties on the Image media type (a textstring) can be retrieved just fine. I think this is probably to do with the fix for U4-4624, though I cannot be sure.
How are you accessing the value ? Please provider examples
I think i can replicate, stay tuned
I think it's because the xml for the cropper data is not going into the examine index...
Yup, I've found out why this is and it's because an xml fragment doesn't go into the Examine index due to the extension method used to extract values from the xml:
which is part of the Examine core. This apparently has never worked for xml fragments but it was working in previous versions because if a value was missing from the examine cache, we'd go look it up in the database (or legacy xslt cache). So in theory using the cropper up until now would have always had a fairly bad performance issue.
I'm hoping that you can still provide me with some example code of how you were working with the resulting value?
There is no property value converter for the cropper (currently) so with this fix in place, if you do
Umbraco.TypedMedia(1234).GetPropertyValue("cropper") you will get back a string like:
Hopefully this is the same string structure you were getting previously?
Thanks for the fix. Quite an interesting little bug that has been lurking there for a long time... The XML looks correct, yes: I shall test it when I get back to my computer. I wrote a custom PropertyConverter to deal with the XML, but I disabled it for troubleshooting the issue.
Ok great, so long as you've been dealing with a string then we're all good!
Definitely a long overdue hidden issue - has just been masked by other bandaid code for so long but now that bandaid code is gone (a good thing!)
Is there a nightly with the fix (preferably version 6.2)? Or which commit is it fixed in, then I'll just build from source.
There'll be a nightly out eventually when the build server kicks in . In the meantime if you just get the latest 6.2.2 branch from github, it will contain the fix.
Or just get the latest Examine version from Nuget: https://www.nuget.org/packages/Examine/0.1.57.2941
but probably best use the latest of Umbraco as well.
I just tried to upgrade Examine.dll to version 0.1.57.2941 in my 6.2.1 test site. That has no effect. I tried resaving the image and rebuilding the index. Still nothing shows up. Do I have to do anything else? As far as I can see on GitHub, it hasn't reached the 6.2.2 branch yet, so I haven't tried a 6.2.2 build yet (7.x is unfortunately not an option on this project... yet).
You can download my test site here: http://1drv.ms/1lcvASe This is currently at 6.2.1 with the upgraded Examine dll. You can downgrade to 6.1.6 by copying over the bin folder and renaming the web.config files. All the site does is to output the cropper XML on the home page. If you downgrade to 6.1.6, you will see that the XML is output correctly.
Lol! that's because I've accidentally been committing to the wrong branch for ages. Doh! I've been committing to 6.2.1 instead of 6.2.2, will merge it all today.
Confirmed fixed with a build from newest revision in the 6.2.2 branch. Thanks again!
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 6.0.0, 6.1.0, 7.0.0, 7.1.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.1.1, 6.0.6, 6.0.5, 6.0.7, 6.1.2, 6.2.0, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.1, 7.1.2, 7.1.3, 6.2.1, 7.1.4
Due in version: 7.1.5, 6.2.2