Copied to clipboard

Flag this post as spam?

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


  • ShannonC 9 posts 81 karma points
    Jan 02, 2020 @ 17:45
    ShannonC
    0

    Umbraco 8 Bug- Media picker upload button from content editor gets disabled first time it is opened

    So I have multiple media folders and when going between content sections that have media pickers that are directed to another folder- then the first time Add Media + button is clicked the "Upload" button is disabled. If I close and reopen (the right add media panel), the button works. Somewhat similar to this issue here: https://our.umbraco.com/forum/using-umbraco-and-getting-started/91736-media-picker-upload-button-dead-after-upgrade-from-764-7102

    Cursor is over the button that gets disabled the first time Add image is clicked. Works until going to another content node and clicking add image, if the folder is different

  • ShannonC 9 posts 81 karma points
    Jan 02, 2020 @ 18:37
    ShannonC
    1

    For a temp fix (Works as long as content editors are OK to add media to any, not good for long term)- I added:

            //TEMP FIX HERE
            $scope.lockedFolder = false;
            $scope.currentFolder = folder;
            //end temp fix
    

    In .../Umbraco/Js/umbraco.controllers.js LINES ~2268

    Full function:

     $scope.gotoFolder = function (folder) {
                if (!$scope.multiPicker) {
                    deselectAllImages($scope.model.selection);
                }
                if (!folder) {
                    folder = {
                        id: -1,
                        name: 'Media',
                        icon: 'icon-folder'
                    };
                }
                if (folder.id > 0) {
                    entityResource.getAncestors(folder.id, 'media', null, { dataTypeKey: dataTypeKey }).then(function (anc) {
                        $scope.path = _.filter(anc, function (f) {
                            return f.path.indexOf($scope.startNodeId) !== -1;
                        });
                    });
                    mediaTypeHelper.getAllowedImagetypes(folder.id).then(function (types) {
                        $scope.acceptedMediatypes = types;
                    });
                } else {
                    $scope.path = [];
                }
                //TEMP FIX HERE
                $scope.lockedFolder = false;
                $scope.currentFolder = folder;
                //end temp fix
                localStorageService.set('umbLastOpenedMediaNodeId', folder.id);
                return getChildren(folder.id);
            };
    
  • Saif Obeidat 79 posts 296 karma points
    Jan 08, 2020 @ 10:49
    Saif Obeidat
    1

    Hi, I had the same issue on Umbraco v8.4, and I did something similar to your solution which is sure bad, but it's temporary.

    I removed hasFolderAccess(folder) === false part from the below code:

    $scope.lockedFolder = folder.id === -1 && $scope.model.startNodeIsVirtual || hasFolderAccess(folder) === false;
    

    It seems that hasFolderAccess(folder) returns True the first time, which causes to make $scope.lockedFolder True

Please Sign in or register to post replies

Write your reply to:

Draft