Hi,
1°) error
for info I noted an error when setting the module to display the map of friends:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''user_id' WHERE a.`field_id` = '28' LIMIT 10' at line 6
it occurred on 4.5 version with a user having only 1 friend.
it doesn't make an error if I choose to display the members instead of the friends.
Presently I unpublished the module as it is breaking the page.
2°) If I choose to display the Members, then the super users accounts are displayed (even if the general settings of JS indicates not to show super users in the wall: "Show Administrators in Member's Lists" set to "no").
regards
yves
Hi
I will need an FTP access to fix that. Also can You please prepare a test page with a module published when broken so I'll be able to check my progress during an attempt to fix? It should be a Special access level page so only users with Super User will be able to see.
Hi Piotr,
I indicated the FTP access and the test page for you in the private section of the first post.
The test page is located on the English version of the website as a sub-menu under the "Community" main menu.
Hi
Thank You for the access. I was able to locate the code responsible for events not showing and commented it out for now, but please leave the FTP access since it's not a good solution. I need to consult it with programmers so they can advice a less invasive workaround.
Hi
Sorry I missed the first problem with a map. But I cannot see this problem. Can You please prepare it as with the last issue and lead me to where I'll be able to see it ? Thank You in advance.
Hi,
I modified the settings of the module for mapping the members to show all members instead of friends only.
you can see it on the community test page for you.
If you look on the map in Belgium, you will then see that the pointer is showing an administrator despite the general configuration of JS not to display super users.
Hi
I've checked and indeed You can see it as long as You are a super user Yourself. I've made a test and a user with a permission lower than that does not see a location of Super Users. I think it's working correctly.
Hi Piotr,
I just tested also, using another user account which is not a super user, but I can still see the users who are super users on the map.
you can make a test with a user having the same rights as the rights given on the Member map module.
regards
yves
Hi
I'm very sorry, but I got confused. I've been talking about the first problem mentioned about the syntax error in DB query.
So lets focus on second problem with Super User only. In fact module does not hide any users. By default You can only see Friend or All users despite the fact if such user is a Super User or other.
I've modified /modules/mod_community_membersmap/helper.php starting from line 237 and added this code to remove Super Users from showing on map:
foreach($row as $k=>$m){
$count = 0;
$sql = 'SELECT COUNT(*) FROM '.$db->quoteName('#__user_usergroup_map').' WHERE '.$db->quoteName('group_id').'='.$db->Quote(8).' AND '.$db->quoteName('user_id').'='.$db->Quote($m->user_id);
$db->setQuery($sql);
$count = $db->loadResult();
if($count){
unset($row[$k]);
}
}
Hi
I'm afraid it will be overwritten during updates and it's a file which does not support overrides, so it will need to be recreated each time.
Hi,
Thank you for the precision. I will make a copy of the file to be able to see where you inserted the code.
Have you some feedback about the error on the community page when we choose to display "friends" instead of "all members" on the map module?
Hi
Of course. Just send You a friend request to have exactly 1 friend so the issue should be visible than. Am I right? Are those the requirements for this bug to show ?