We have moved to GitHub Issues
Created by Jeroen Breuer 29 Dec 2012, 19:24:29 Updated by Jeroen Breuer 14 Jan 2013, 21:37:12
Relates to: U4-1371
Relates to: U4-1372
Relates to: U4-1438
After uploading an image the other media properties aren't set automatically. See attachment. Settings in the UmbracoSettings.config seem correct:
Looks like in umbraco.cms/businesslogic/datatype/FileHandlerData.cs there is the following code: Content content = Content.GetContentFromVersion(Version); This probably is the same problem as the issue where [values aren't available in the before save event.|http://issues.umbraco.org/issue/U4-1372] when you're using this: Media(mediaId).getProperty("umbracoFile") instead of this: sender.getProperty("umbracoFile") This code is executed each time the upload property is set. So when using the normal create option in the media section, but also the new 4.9 multiple file uploader or create option of the RTE. It's also used when you create media in DAMP.
Fixed this by writing a BeforeSave event subscriber for the legacy Document and Media classes, so the values are set properly prior to the content being saved. It wasn't possible to keep this entirely in the DataTypeUploadField class, but its probably for the better :)
One thing I noticed is that once the image is uploaded you have to re-load the node to have the values of the properties displayed. Not sure if this is normal behaviour in the Media section? Haven't tried it on regular Content node.
I think you should ask Tim about that. He once created a fix so that the image didn't have to be reloaded, but that might not work with the new save event fix you created.
Assignee: Morten Christensen
Backwards Compatible: True
Affected versions: 6.0.0
Due in version: 6.0.0