We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    I'm in Security > Resource Groups (Revo 2.2.10-pl)

    I have about 10 resources under 'web', on the right side, and a resource group (old group) on the left with 4 resources under it.

    I want to create a new resource group and transfer some 3 of the resources from the old group to the new group.

    I create the new group and then drag 3 resources from the old group to the new group. They appear in the new group and also remain in the old group. So, each of these 3 resources is listed in both groups. Seems ok (although intuitively I would expect dragging to move, not copy).

    Then things go weird: I now want to remove the 3 resources from the old group, but I can't. If I hover over a resource name, the resource is highlighted, but under the new group. If I go ahead and right click the resource in the old group (even though it's not highlighted) and select "Remove Resource from Group", the resource is removed from the new group (where it was highlighted).

    To do what I want, I have to remove resources from the old group first and then add them to the new group from 'web' on the right side.

    I suspect there is simply an id duplication etc going on; something javascripty anyway.

    Any fixes out there for this issue?

    Or are there faster methods for organising resources between groups? This method is pretty slow if you have a lot. A grid with tick boxes for each resource-group would be great.
      • 3749
      • 24,544 Posts
      Does it help if you reload the Manager page between actions?

      You might also try turning off the compress_js (and maybe compress_css) System Settings if you haven't already.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 10525
        • 247 Posts
        Tried all three of your suggestions Bob but none worked. After changing the system settings I flushed all sessions and logged in again, but nada.

        In fact the issue is weirder than I thought: when I drag resources from web straight to both groups, directly from web, they still seem to be dominant in the old group. If I drag from web to old group, then from old to new group, they are dominant in the old group. By dominant I mean the one which gets highlighted and which is removed.

        I can see several aspects of this page which are a bit awkward from a HCI perspective: I think that each resource should appear once only. If there are several groups and resources you have to scan everything multiple times to know what goes where. It is also extremely slow. Every add/remove requires an ajax call and a refresh. If I want to shift all of my resources into a group, it's a long task.

        I think a nice lightweight grid would be useful, at least as an alternative: resources down the left, groups along the top, a tick box at every intersection and a box below each group name to toggle every box on/off for that group. Tick tick tick, submit, and you're away.

        Alternatively, have a box for each group and be able to select and drag multiple resources at once. That would be nice and still faster...
          • 3749
          • 24,544 Posts
          Have you determined whether this is a cosmetic problem or a real problem with the code? I've seen cases where the grid was wrong but the action was performed correctly.

          When I did the grid for the CMP that comes with MyComponent, I updated the grid locally, so the changes in the grid are immediate while the processor runs in the background. It's *way* faster. The down side of that is that sorting gets a little funky when you have multiple pages, and of course if a processor fails, the grid is not accurate.

          If you look at what's happening in Chrome dev. tools, you'll see that a lot of the Manager grids actually refresh twice when you perform an action. I'm not sure why. Maybe the one you're using doesn't do that and needs to.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 10525
            • 247 Posts
            OK, testing again, looking at the front end and responses in the database:

            I have two empty groups (IDs 4,5), four resources (IDs 1-4)
            I move resources 1 and then 2 to group 4.
            I then move resources 3 and then 4 to group 5, to get:
            Group (4)
            ....Page1 (1)
            ....Page2 (2)
            Group (5)
            ....Page3 (3)
            ....Page4 (4)
            (Whenever I move a resource it remains highlighted in the web list on the right. No apparent ill effect, just saying.)
            Watching the database, the updates look correct.
            Click any resource in group 4 or 5 and it highlights ok.

            Now, I move resource 3 up to group 4. It now appears in both groups and also the web list, to get:
            Group (4)
            ....Page1 (1)
            ....Page2 (2)
            ....Page3 (3)
            Group (5)
            ....Page3 (3)
            ....Page4 (4)
            In the database, resource 3 is now in both groups 4 and 5. All ok.
            If I now hover over or click on resource 3 in group 5, it is highlighted in group 4 only (strange)

            If I go ahead and (carefully) right click on resource 3 in group 5 and select "Remove...", resource 3 is removed from group 4, NOT group 5. This is confirmed in the database. (This is expected, as regards which version of the resource was highlighted, but strange because I didn't click that one).

            Now, when I click/hover resource 3 in group 5 it highlights normally and I can remove it, again, confirmed in the db. OK.

            So it looks to me as though it is only the most recent copy of a resource that is "active", although it is still connected somehow with the copies that it is descended from.

            On screen, this is like a hybrid of move-on-drag and copy-on-drag behaviours: the latest instance is live, but the previous versions are not removed.

            In the database, it looks like wholly copy-on-drag behaviour.

            I'm doing this in Chrome.

            I'll test in Firefox.
              • 10525
              • 247 Posts
              OK, the description of behaviours above applies the same to Firefox.

              One other observation (both browsers): as I drag resources from the web list on the right to the groups on the left, each one remains highlighted on the right. It doesn't seem to cause any damage, but just a little disconcerting. Maybe it's meant as a record of what's just been moved, but a couple of actions later and these highlights disappear anyway. Looks like an oversight.