Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • organic 97 posts 134 karma points
    27 days ago
    organic
    0

    Media Picker 'upload' button dead after upgrade from 7.6.4->7.10.2

    I have an image field using data type "Media Picker" that uses property editor "(obsolete) Media Picker" and property editor alias is "Umbraco.MediaPicker" (not "Umbraco.MultipleMediaPicker"). I have upgraded from 7.6.4 to 7.10.2 locally and then published to an Azure web app. On the Azure site the 'upload' button is not opening a 'file upload' dialog, it is just a dead click. I see no errors in Chrome Dev Tools. I have incremented ClientDependency id in case old scripts were cached. On the locally upgraded(via NuGet) site the 'Upload' media button works correctly even if I set debug=false so that the CD bundles scripts the same way as the Azure site. I thought maybe I'm missing a controller script but I can't tell.

    I see Umbraco.MediaPicker is not even listed on Umb Prop Editors ,it only lists Umbraco.MultipleMediaPicker.

    Update: The 'Upload' button is still dead when I create a new doctype property that uses a new data type that uses editor '(Obsolete) Media Picker - Umbraco.MultipleMediaPicker' or 'Media Picker - Umbraco.MediaPicker2

  • Connor Brough 4 posts 74 karma points
    26 days ago
    Connor Brough
    0

    I am experiencing the same problem, neither the old or new media picker work. When I click the upload button nothing happens.

    No error's are appearing in the console and nothing obvious missing so it's difficult to debug.

    Have you managed to fix the issue? or Do you know the specific cause (which version or change that has broken the functionality)?

  • organic 97 posts 134 karma points
    26 days ago
    organic
    0

    Connor, good to hear I'm not alone, but no I have not fixed this yet. I'm not sure what more info I can provide, I put everything I could think of in the original post. 7.10.2 upload button works locally and then when I publish a non-debug/Release version to Azure it does not work. This is the only bug I've found, which is always strange when just one small feature is broken. Since upload button doesn't work on the new editors either it appears it is not caused by the old editor being marked 'obsolete'. I'll see if I can make a new empty 7.10.2 site today, publish it to Azure and test again that way.

    You are on Azure, too?

  • Connor Brough 4 posts 74 karma points
    25 days ago
    Connor Brough
    0

    Yeah am on Azure as well, however my upload button doesn't even work locally.

    Let me know how you get on with creating a new empty site.

  • Ross 5 posts 75 karma points
    22 days ago
    Ross
    0

    We have identified a "workaround" for dealing with this issue until a fix is identified - within the Media Library itself, if you create a new folder, the link to "choose files" successfully opens a file picker as expected and video/images can be uploaded.enter image description here

  • organic 97 posts 134 karma points
    22 days ago
    organic
    0

    I'm confused by your reply because there was never a problem using 'click here to choose files' in the Media section, so creating a new folder in Media doesn't provide any new functionality there. Let me know if I misunderstand.

    Ironically, after creating a new folder in Media, when I go back to Content and test again, the Upload button DOES open a 'file upload' dialog as long as the 'Select Media' area starts in a folder, not just in the root /Media. This is my experience even if I delete the new folder I created in Media and so maybe this was true even if I did not try what you suggested and you've nudged me to discover this! Can others test and report back? Does Select Media 'file upload' work as long as you are not starting in the Media root? If I start in a Media sub folder and then browse back to Media root 'file upload' DOES work.

  • organic 97 posts 134 karma points
    22 days ago
    organic
    0

    I have my prior 7.6.4 site version still running as a deployment slot in Azure. I retested this bug there and now I see NO different between 7.6.4 and 7.10.2! Neither of them open the 'File Upload' window from a Content node's Media Picker field if the 'Select Media' side area starts in the Media root. If I browse into a Media subfolder then 'File Upload' DOES open. And if I browse back to Media root it DOES also open. Perhaps my site admin who reported this bug is crazy. Can you guys provide any info? Do you think this is a fake bug?

    UPDATE: I retested my local 7.10.2 version before I published it to Azure and I can confirm that 'File Upload' did work even when on the root Media node. But then after publish it did NOT work and created this post.

  • Ross 5 posts 75 karma points
    22 days ago
    Ross
    0

    Yup - you're quite right, if I navigate to a folder the "File Upload" button begins working, and still works if I navigate back up to the root folder!

    There's definitely something odd going on...

    In my initial "workaround" for this, I mentioned adding a folder as I can't see how you choose files within Media and upload the to the root folder - unless I'm missing something!

  • organic 97 posts 134 karma points
    21 days ago
    organic
    0

    Lets be clear where we are. The bug I posted is while admining a node in the Content area. The workaround you described was in the Media area, correct? The drag or 'click here to upload files' section in Media works for the Media root upon page load or click of the top most Media node above the folders or within a Media folder. This is confusing because Media is also the first breadcrumb in 'Select Media' when admining content.

  • Ross 5 posts 75 karma points
    21 days ago
    Ross
    0

    To clarify - the issue we are seeing is when trying to add media whilst administering a content node, for example - adding a video via a Macro ,when the "Select media" tab is opened the "Upload" button below doesn't trigger a file upload window:

    enter image description here

    However, as you noticed, if you navigate to a folder, (and even back up to root), this button begins to function.

    The "Choose files" functionality within the main Media tab below appears to be working without issue.

    enter image description here

  • Connor Brough 4 posts 74 karma points
    19 days ago
    Connor Brough
    0

    How'd you get on with installing a fresh version of Umbraco? Did the upload button work then?

    It'd be weird if this issue occurs on a fresh installation as it's a pretty obvious bug which is proving very difficult to diagnose what the issue is especially that it starts working with the workaround mentioned above.

  • organic 97 posts 134 karma points
    15 days ago
    organic
    0

    Sorry, I will try to do this test today. This got away from me because I realize I am actually happy about this 'bug' because now my editors have to put images in folder and not clog up the Media root with disorganized images!

  • Connor Brough 4 posts 74 karma points
    6 days ago
    Connor Brough
    0

    Did you find time to check a new installation? Although by the looks of it, it may not be a bug and may have been designed like that.

    There's an issue over at issues.umbraco.org - http://issues.umbraco.org/issue/U4-11039

  • organic 97 posts 134 karma points
    5 days ago
    organic
    0

    I created a new solution in VS and installed latest version 7.10.4 via NuGet with the Starter Kit running SqlCE.

    I enabled deprecated data types in UmbracoSettings.config via: "showDeprecatedPropertyEditors = true"

    I created a new Person-Photo-Media Picker data type using Property Editor Alias: Umbraco.MediaPicker with no starting folder set.

    I added a property to the Person doctype.

    I published to an Azure Web App and while I get occasional SqlCe umbraco.sdf file lock errors I'm still able to test.

    And... The Upload button works in all cases including the Media root!

    Conclusion: Upload should have continued to work after my(our) upgrades, but I can't say I know this technically an Umbraco bug. I'm confused by the statement in the Issue "At some point in recent Umbraco history, it became standard procedure for media uploads to be disallowed at the root level of media." because I find no documentation of that.

    What do you think?

  • Ross 5 posts 75 karma points
    15 hours ago
    Ross
    0

    Ok - had a bit of time to dig around into this today and have found out what is causing the button to not work when initially opening the media picker in the root folder.

    Unfortunately I've not quite worked out why - but here's what I've found.

    Basically, when the media picker is first opened in the root folder the following is used from /Umbraco/views/common/overlays/mediaPicker/mediapicker.html

            <umb-file-dropzone ng-if="acceptedMediatypes.length > 0 && !loading && !lockedFolder"
                           accepted-mediatypes="acceptedMediatypes"
                           parent-id="{{currentFolder.id}}"
                           files-uploaded="onUploadComplete"
                           files-queued="onFilesQueue"
                           accept="{{acceptedFileTypes}}"
                           max-file-size="{{maxFileSize}}"
                           hide-dropzone="{{!activeDrag && images.length > 0 || searchOptions.filter }}"
                           compact="{{ images.length > 0 }}">
        </umb-file-dropzone>
    

    There is then a directive within /Umbraco/Js/umbraco.directives.js which adds an uploadForm:

       angular.module('umbraco.directives').directive('umbFileDropzone', function ($timeout, Upload, localizationService, umbRequestHelper) {
        return {
            restrict: 'E',
            replace: true,
            templateUrl: 'views/components/upload/umb-file-dropzone.html',
            scope: {
                parentId: '@',
                contentTypeAlias: '@',
                propertyAlias: '@',
                accept: '@',
                maxFileSize: '@',
                compact: '@',
                hideDropzone: '@',
                acceptedMediatypes: '=',
                filesQueued: '=',
                handleFile: '=',
                filesUploaded: '='
            }
    .
    .
    .
    .
    .
    .
    

    The reason this appears to not be working when initially in the root folder is that the value for acceptedMediatypes.length is initially 0. When you go down a folder this is changing to 1, (for us at least), and then the uploadForm is added and the upload button begins to work as expected - even when navigating back to the root folder.

    I'm currently trying to work out where the Accepted Media Types value comes from - but at least this feels like some progress!

  • Ross 5 posts 75 karma points
    14 hours ago
    Ross
    0

    Ok... so finally worked this out!

    Basically our two media types of File and Image were not set to "Allow as root" in the premissions:

    enter image description here

    As such, the upload button doesn't work when in the root folder. This must have been something which was fixed between 7.6.4 and 7.10.2 as images were successfully loaded into root prior to the upgrade.

    The existing bug now seems to be two-fold - one is the fact the button doesn't look disabled when it should do, (which is the issue linked previously), the second is that all you need to do is to navigate into a folder and then back to root in order to upload files into the root folder....

Please Sign in or register to post replies

Write your reply to:

Draft