3

We have problem with uploaded media item in Sitecore 9. When we are uploading some media file (image, video etc.), it will be created only in default language and not in all languages. This worked in Sitecore 8.x, but in Sitecore 9.0.1 no. Any solution?

  • have you checked setting <setting name="Media.UploadAsVersionableByDefault" value="false" /> ?. There's also a setting when using the advance media dialog: "Make Uploaded Media Items Versionable" – josedbaez Apr 10 '18 at 13:54
  • Yes, that was the first thing I checked and Media.UploadAsVersionableByDefault is set to false – Jiri Semrad Apr 10 '18 at 14:07
  • hmmm wonder if this still applies kb.sitecore.net/articles/959696. Was fixed on CMS 8.2 Update-5 – josedbaez Apr 10 '18 at 14:14
  • That's a good question, I'll try to contact Sitecore Support for some advice :) – Jiri Semrad Apr 10 '18 at 14:23
2

Here is the answer from Sitecore Support. I've tested the settings and everything works just like with previous releases.


The behavior that you are referring to has been changed in Sitecore 8.2 Update 3. The reason for the change is that it has been recognized as a bug (reference number 94414). Here is a link to the corresponding Release Notes: here

In order to revert to previous behavior, you might specify "mediaCreator" under the "mediaLibrary" configuration:

    <mediaPrefixes>
     <prefix value="~/media"/>
     <!--  Prefix to identify WebDAV media requests  -->
     <prefix value="/sitecore_files" patch:source="Sitecore.WebDAV.config"/>
 </mediaPrefixes>
 <mediaCreator type="Sitecore.Resources.Media.MediaCreator, Sitecore.Kernel"/>
 <requestParser type="Sitecore.Resources.Media.MediaRequest, Sitecore.Kernel"/>

If no type for "mediaCreator" is specified, the "Sitecore.Resources.Media.MediaCreators.SingleLanguageMediaCreator" type is used.

However, the media items that you have shown in the video are unversioned. This means that their "Media" field is "Shared" and thus such media items should be available for use even if they don't have versions in the current language.

1

We actually submitted this bug to Sitecore for 8.2-Update-5 (where it was definitely not fixed), and were essentially told that this was by design since version 8.2.

The explanation given was that uploading of unversioned media on sites with many languages caused significant slowdowns, hence the behavior was modified to create the item only in the current language. Note that an "unversioned" item is still (correctly) created based on the Media.UploadAsVersionableByDefault setting being false, but only in one language. I suspect that this is the bug that was fixed in 8.2-Update-5 (a versioned item was previously created).

If you look in the release notes for Sitecore 8.2 Update-3, you'll see the following:

The MediaCreator creates versions in every language of unversioned media items. (94414, 398089)

The main problem this new behavior poses is in the handling of the Alt field, where you will have to manually create language versions as needed. But even with only one language version, the media file itself should still be accessible in all languages (unless you're using a funky media URL pattern). However, Sitecore will create the media items in whichever language is currently active, which, if you like to keep your tree clean and tidy, could be a source of irritation.

To get the previous behavior back, you would need to customize Sitecore. We added a handler to the item:added event.

  • 1
    Hi maz, thank you for the reply, I tried to send this issue in Sitecore 9.0.1 to Sitecore support and now I'm waiting for answer. – Jiri Semrad Apr 11 '18 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.