Problem with filters and maps

Version 7.9.17

Sugar Version 6.5.25 (Version 344)

Hello to all, i have an issue with the map on my crm. When i filter with a assigned to i found 253 account. I select them all and then i clic on the maps. But when the maps is loaded it shows me ALL the account without any kind of filter. Is a bug or i can’t actually do it?

Hi Gianluca, haven’t seen you in a long time!

This might be a bug. Can you try the other list actions (export, etc) to see if they also ignore the filter?

Also, try it on the live demo to see if it is fixed in the newer versions.

On which module is this?

Seems like only in the maps, if i try to export it works fine. The module is Accounts, but i can’t actually update at the newest version of the crm, so i have to find a way to fix it.

Ok, but do you mean that you tested it in the live demo, and it works fine in the newer versions?

If so, you could go on Github and look for the PR that fixed it. If not, then I guess it would be good to open a new Issue…

Sadly i can’t test it, because there are too few accounts, and if i apply a filter i can’t make more then one page. and if i select just the first page, works on mine too, the only problem is when i “select all”.

Use a filter for “Country” = USA, this includes all 50 accounts there.

If you want you can change the country of 2 or 3 to something else before, if you need the filter to actually exclude anything.

I can’t on the live demo because i need a api key of google maps and i can’t insert because i can’t enter in the administration mode

Admin demo here:

give it a couple of minutes to spin up

if i edit something on the admin demo, it will apply on the live? because there are no record in any modules on the admin demo.

Yes it will.

They don’t use sample data there, unfortunately. But you can easily export from the other demo and import there.

Note that these online demos will refresh every X minutes, so if you see it becoming irresponsive or wiping out your data, you’ll have to start over. But I think it’s hourly, you should have more than enough time unless you have really bad luck.

SO i have extract the accounts, added the api key and do the stuff, but on live demo(admin version) doesnt work at all, just shows me an empty map

Thanks for all the hard work. That is disappointing. :frowning:

You see, the problem is that if you open an Issue on Github, it’s likely not going to advance because there are so many things going on there, and Maps issues are really hard to understand and test, there is so much set up that is necessary, our devs never use it and it wasn’t written by us…

So unless somebody who uses it is able to dive into the code and work on it, I don’t have high hopes…

ok i will try to fix by myself. thanks anyway for the support

Hei, i re open this thread. could you just give me a possible tip to where i can searh to fix this bug? is hard for me to understand what the action calls when i clic on maps. thanks

What is the URL?

If there is a controller.php file in that module, then usually all the actions are defined there. If there isn’t, then each action probably has its own .php file (the file name is the same as the action name).

But the best way to trace the code is to use a debugger so it takes you to the right place :wink:

after some digging, i found this

 $script .= "<a href='javascript:void(0)' id='map_listview_top' " .
                " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " .
                "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " .

but actually i need to figure out what he actually calls. because i don’t get where it takes the applied filer or other things

Have you seen this?

ye, but i’m jumping from a function to another trying to find the right one. sadly if i try to calls maps on my localhost, it just log me out. So is kinda hard XD

i’ve found the bug. If i select the first 20 accounts. in the $_REQUEST there is the list of the id. If i clic on “select all” regardless if there is a filter or not, in the $_REQUEST the list is empty, so it will go to take all the account instead. So the problem is not on the map module, but the fill of the $_REQUEST if there is an applied filter. Any tips where i can edit the $_REQUEST array?

It looks like you’re seeing this from the perspective of the web server request that happens after you click on the maps.

You’d have to find the place in the code where it’s building up that request, so maybe start from the Javascript (or HTTP submit) on the Maps button, and see if you can trace it from there… but you might also gave to look at the code in the Select buttons…