Copied to clipboard

Flag this post as spam?

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


  • Remko 118 posts 283 karma points
    Aug 15, 2018 @ 14:57
    Remko
    0

    Umbraco 7.12.0 multi node tree picker start node not working anymore?

    Whatever I try.. picking a node as a start node, or using xpath, the multinode tree picker seems to go to the node you are editing at that moment... Anyone else got this problem?

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 15, 2018 @ 17:56
    Sebastiaan Janssen
    1

    I can't reproduce this in a simple setup, maybe first of all try to update the version number in ~/Config/ClientDependency.config (just make it 1 higher or lower) and thoroughly refresh your browser cache.

    Do you have this issue on your local environment or after pushing the upgrade to the server? Maybe some files didn't get updated?

  • Remko 118 posts 283 karma points
    Aug 15, 2018 @ 18:36
    Remko
    0

    Hi Sebastiaan,

    Already did the clientdependency thing and also removed all client cache, but still the same problem.

    Did a nuget update from 7.8 to 7.12 and testing it on a local machine.

    Also tried removing entire bin, umbraco and umbraco_client and restore nuget packages, so I didn't have any old umbraco files, but still same problem..

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 15, 2018 @ 18:39
    Owain Williams
    0

    I've also had the same issue. Out of interest, are you using it within Nest Content Remko?

    Mine was an upgrade from 7.11.1 to 7.12

  • Remko 118 posts 283 karma points
    Aug 15, 2018 @ 18:40
    Remko
    0

    No, not with nested content, just regular mntp.

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 15, 2018 @ 18:41
    Owain Williams
    0

    Mine is still with the multinode tree picker but I've the doctype in Nest Content so thought that might be the issue but I guess not.

    I'll try and do a screen grab to illustrate the issue

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Aug 15, 2018 @ 19:06
    Anders Bjerner
    7

    Steps to reproduce:

    1. Install Umbraco 7.12.0 (via NuGet) with default options (including the Starter Kit)
    2. Add new MNTP data type (I called mine Generic MNTP, but it shouldn't matter)
      • Set start node to the About us node
    3. Add data type to the Home content type (in my example I added a new tab called Testing and called the property Testing as well - I'm good with names like that)
    4. Go to the Home node in the content section, and then go to the newly added property
    5. When opening up the picker, it starts a tthe root of the content tree, and not the About node as selected.

    This is an issue in 7.12.0, but not in 7.11.0 following the same approach as described above.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Aug 16, 2018 @ 06:45
    Dave Woestenborghs
    2

    I can reproduce it as well using the steps provided by Anders.

    Dave

  • Remko 118 posts 283 karma points
    Aug 16, 2018 @ 07:52
    Remko
    2

    Maybe this has anything to do with it? "U4-3921 Move/Copy/Content-Picker time saver - pre-selects current node " http://issues.umbraco.org/issue/U4-3921

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 16, 2018 @ 08:34
    Sebastiaan Janssen
    2

    Cheers Remko, that must be exactly it! I'll dive in and fix it up! 👍

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Aug 16, 2018 @ 08:32
    Niels Hartvig
    10

    While I of course wished we never shipped with bugs, reading this thread made my day - thank you to everyone who contributes and participates in making Umbraco better. From bug reporting, to investigating ways to reproduce, to confirming, to pointing to potential root causes.

    Massive High Five You Rock, everyone. This is what Umbraco is.

    /n

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 16, 2018 @ 12:26
    Sebastiaan Janssen
    0

    As a potential solution can you test the following:

    In ~/Umbraco/Js/umbraco.controllers.js find function treeLoadedHandler and replace it with:

        function treeLoadedHandler(ev, args) {
            //args.tree contains children (args.tree.root.children)
            $scope.hasItems = args.tree.root.children.length > 0;
            tree = args.tree;
            var nodeHasPath = typeof node !== 'undefined' && typeof node.path !== 'undefined';
            var startNodeNotDefined = typeof dialogOptions.startNodeId === 'undefined' || dialogOptions.startNodeId === '' || dialogOptions.startNodeId === '-1';
            if (startNodeNotDefined && nodeHasPath) {
                $scope.dialogTreeEventHandler.syncTree({
                    path: node.path,
                    activate: false
                });
            }
        }
    

    the last curly here is right before the line that says //wires up selection

    Then update the version number in ~/Config/ClientDependency.config (just make it 1 higher or lower) and thoroughly refresh your browser cache.

    The problem seems to be that we didn't take into account whether or not a startNodeId was specified when opening the tree at the current location.

    Look forward to hearing if this helps!

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 16, 2018 @ 12:53
    Owain Williams
    0

    Tried it here but still seems to cause the issue of not taking the user to the correct node.

    Cache deleted, CD incremented and restarted IIS.

    O.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 16, 2018 @ 12:56
    Sebastiaan Janssen
    0

    still seems to cause the issue of not taking the user to the correct node.

    Okidoki but as I recall you had the problem from withing nested content, right? I haven't tested that and I don't know if that problem was already present in earlier versions?

    If it's not in NC, then do you have steps to repro? How to configure MNTP, how does your content tree look, what did you see, what did you expect? :)

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 16, 2018 @ 13:01
    Owain Williams
    0

    This wasn't in NC, I just put it straight on the docType.

    Set up to show the categories node.

    enter image description here

    The Categories doctype is within the Global Settings but as you can see, when I click on the MNTP within my content tree (what the user would see) it expands all the nodes and doesn't show Categories

    enter image description here

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Aug 16, 2018 @ 13:03
    Anders Bjerner
    0

    Just to chime in, the suggested fix solves the problem for my solution ;)

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 16, 2018 @ 13:04
    Owain Williams
    0

    Ok, so maybe ignore me. I was hesitant about posting as I did worry my solution might just be a bit odd. Sorry Seb if I've wasted your time.

    I'll investigate further here.

    O.

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Aug 16, 2018 @ 13:07
    Anders Bjerner
    0

    Don't hesitate. Could be that there are multiple places with the same bug ;)

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 16, 2018 @ 14:01
    Sebastiaan Janssen
    0

    Thanks Owain! Always good to report when something is not working, would like to be as confident as possible that something is fixed.

    I tried your example and it seems to work for me:

    enter image description here

    Can you open your dev tools > Sources > Umbraco > Js > umbraco.controllers.js and make sure that the code has actually been updated in your browser? Sometimes caches are extremely persistent.

    enter image description here

  • Remko 118 posts 283 karma points
    Aug 17, 2018 @ 10:22
    Remko
    1

    For me it worked, thanks all!

    Make sure you replace the right function, because function treeLoadedHandler appears more than once in umbraco.controllers...

    So as in screenshot, replace function on line 4324.

  • Owain Williams 480 posts 1412 karma points MVP 6x c-trib
    Aug 20, 2018 @ 07:57
    Owain Williams
    2

    Hi, I checked my code location and you are correct Remko, I pasted it in the wrong place. It's now working :)

    O.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 20, 2018 @ 08:34
    Sebastiaan Janssen
    0

    Awesome! Thanks for the feedback Owain!

  • Dmitriy 168 posts 588 karma points
    Feb 18, 2019 @ 14:53
    Dmitriy
    0

    Have the same issue in 7.13.2 :(

Please Sign in or register to post replies

Write your reply to:

Draft