Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 589 posts 803 karma points
    Aug 25, 2015 @ 13:46
    Fredrik Esseen
    0

    Start node in media in Grid Media Picker

    Hi!

    I have a solutions with a lot of user that is going to use Umbraco backend. Every user has its own media folder and I've added that folder as the start node for the user.

    But when I use the grid's own Media Picker I dont get traversed down to the right folder and no other folder is visible.

    Is that property editor not connected to media start node..?

  • Fredrik Esseen 589 posts 803 karma points
    Oct 14, 2015 @ 07:53
    Fredrik Esseen
    0

    Sorry for bumping this but just want to know if this is a bug?

    Im using 7.2.5 and I cant see that this problem is fixed in the later releases.

  • Thomas Beckert 162 posts 369 karma points
    Jan 25, 2016 @ 11:57
    Thomas Beckert
    0

    I have the same problem in Version 7.2.8 - I determine a media start-Node, but in the grid, the User only see "media" with empty content and there is no way to see his folders, files or to upload new one.

    Is there a workaround for this issue?

  • Fredrik Esseen 589 posts 803 karma points
    Jan 25, 2016 @ 12:00
    Fredrik Esseen
    0

    For me the only solution was to move all folders to the root of the media section. Then I was able to reach the folders!

  • Thomas Beckert 162 posts 369 karma points
    Jan 25, 2016 @ 12:02
    Thomas Beckert
    0

    Mh, but in a multi-user environment, this is not an option for me. User 1 has its own media folder and User 2 is not allowed to access the folders of User 1 and vise versa.

  • Thomas Beckert 162 posts 369 karma points
    Jan 25, 2016 @ 13:49
    Thomas Beckert
    0

    Seems that in Version 7.4. the problem is fixed.

  • Thomas Beckert 162 posts 369 karma points
    May 04, 2016 @ 21:21
    Thomas Beckert
    0

    The error returned with me. Running Version 7.3.4.

    I investigate the code. I logged in with a user, that has a subfolder of the media section as Startnode.

    In the Umbraco.Overlays.MediaPickerController, this line setup the startnode of the media picker. If I hardcode the ID of the Startnode, everything works:

    Line 3283 of /umbraco/js/umbraco.controllers.js

    $scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
    

    Console-Log of dialogOptions.startNodeId returns undefined.

    So what can I do? I don't want to overwrite core-code for this. Did I configured something wrong or is this a bug?

    Please help!!!

  • Thomas Beckert 162 posts 369 karma points
    May 04, 2016 @ 21:58
    Thomas Beckert
    0

    Ok. Here is my workarround for the issue, but I would be pleased to get feedback from the hq, if this is a correct solution and will be fixed in the future - cause updating umbraco will be difficult, if I change core code. :)

    First, I added the userService to Grid.MediaController in line 10259:

    .controller("Umbraco.PropertyEditors.Grid.MediaController",
        function ($scope, $rootScope, $timeout,userService) {
    

    After that, I insert the following code to line 10261:

    if (!$scope.model.config.startNodeId) {
                userService.getCurrentUser().then(function (userData) {
                    $scope.model.config.startNodeId = userData.startMediaId;
                    console.log($scope.model.config.startNodeId);
                });
            }
    

    Finally, in line 10278, I added this:

    $scope.mediaPickerOverlay.startNodeId = $scope.model.config.startNodeId;
    

    Now, the correct StartNodeId is set.

  • Kim Holzmann 17 posts 97 karma points c-trib
    May 11, 2017 @ 12:28
    Kim Holzmann
    0

    Hi

    Have you created an inssue in the issue tracker? I couldn't find anything

    http://issues.umbraco.org/issues?q=Grid.MediaController

Please Sign in or register to post replies

Write your reply to:

Draft