Device Group Not Showing

Neil Romig2 years ago

Just trying 5.2 and having problems with device group. I use a few different tracker models and group them accordingly. "FMB120" & "FMB920" are two groups which belong to group "FMB", which in turn belongs to top-level "Teltonika" group. Now the devices show only the top-level group name and I am unable to see any other group. When I switch back to old interface now, only the numeric id is shown and I have only the option to select the top-level group name.

Anton Tananaev2 years ago

This should fix the issue:

https://github.com/traccar/traccar/commit/929240716f09627de9823d411a11fc0cdf6eb49b

In the meantime the workaround is to explicitly link all groups to the user.

Neil Romig2 years ago

More news on this. I went to re-activate a device which was assigned to another group but couldn't find it. Turns out not all my groups are listed in the web app, and I'm not sure what the cause is. I linked all groups to users as suggested but no difference.
Groups with a null "groupid" are not available in the web app unless they are referenced by another groupid (i.e the group is a parent group).

Anton Tananaev2 years ago

Are you using version 5.3?

Neil Romig2 years ago

Yes (doesn't include above fix).

Anton Tananaev2 years ago

Can you please provide a simple example for reproducing the issue.

Neil Romig2 years ago

Here's my tc_groups table:

+----+-----------------+---------+------------+
| id | name            | groupid | attributes |
+----+-----------------+---------+------------+
|  1 | Teltonika       |    NULL | {}         |
|  2 | Taxis           |    NULL | NULL       |
|  4 | Sold / Scrapped |    NULL | {}         |
|  6 | Ali             |    NULL | {}         |
|  7 | Neil            |    NULL | {}         |
|  8 | Keith           |    NULL | {}         |
|  9 | FM1110          |       1 | {}         |
| 10 | FMB120          |      11 | {}         |
| 11 | FMB             |       1 | {}         |
| 12 | FMB920          |      11 | {}         |
+----+-----------------+---------+------------+
10 rows in set (0.000 sec)

I've assigned groups as needed to my various users, and my admin user is assigned all groups (as seen in tc_user_group). I put devices into group 4 when I want them to "disappear" as only the admin user can see that group, and this was the group of the device I wanted to re-activate by moving to group 10. So:

  1. In the dropdown device list only the Teltonika devices are listed or available for selection.
  2. in the Connections menu of the Account settings (I don't know what this section does!) there is a Group dropdown which shows all groups but doesn't appear to affect anything.

Some screenshots:

![Devices]https://www.dropbox.com/s/x0yoloumgj97kjg/Devices.png?dl=0
![Connections]https://www.dropbox.com/s/uldfb0t4mlhbuky/Connections.png?dl=0

Neil Romig2 years ago

After a little more trial-and-error I see that once I've logged out and back in again, groups selected in the "Connections" panel appear in the Devices dropdown on the map screen, but surely they should appear by default if the user has access to them? Also, if I remove a group from Connections, it doesn't disappear from the Devices dropdown so still puzzled by this.

Anton Tananaev2 years ago

Did it work before? We always required page refresh after linking/unlinking objects.

Neil Romig2 years ago

...and now users have groups in the Devices map dropdown they have no access to! What's happening? I'm trying different user accounts from my PC so is there any possibility of one sessions data being acessed by the next?

Anton Tananaev2 years ago

No. Refreshing the page should clear all the local stuff.

Neil Romig2 years ago

OK, some of this confusion is being caused by my using the same tab for multiple logins. If I log out, then log in as a different user (using the same tab) then the Devices dropdown on the maps shows the previous login's Group list.

Anton Tananaev2 years ago

There's a single session per browser usually, so if you login with a different user in a different tab, it will mess everything up. Use private mode if you really want separate sessions.

Neil Romig2 years ago

OK, I'll try that in future, and perhaps I couldn't see the Group because I picked up a previous login's values. Can this be fixed? It doesn't seem right that a separate login can pick up data from the previous one.

Neil Romig2 years ago

BTW, the problem was caused not by having different users in different tabs together, but a single login using the same tab as a previous one.