@parruc opened this Issue on July 7th 2015 Contributor

In country select I found a non-working option

<select class="userCountryMapSelectCountry">
...
<option value="undefined">European Union</option>
...
</select>

To avoid this I patched visitor-map.js adding the if that excludes undefined isos

                        // populate country select
                        $.each(countryData, function (i, country) {
                            if ( country.iso )
                                countrySelect.append('<option value="' + country.iso + '">' + country.name + '</option>');
                        });

                        initUserInterface();
@mattab commented on July 15th 2015 Owner

Hi @parruc

Thanks for the report.

I can't find "European union" in maps country selector on demo.piwik.org - but there are other "undefined" countries. Here is the full list

<select>
[...]
<option value="undefined">Anonymous Proxy</option>
[...]
<option value="undefined">Satellite Provider</option>
[...]
<option value="undefined">Unknown</option>
<option value="undefined">Unknown</option>
<option value="undefined">Unknown</option>
[...]
</select>

The goal of this issue is to remove "undefined" entries from the Map selector.

@parruc commented on July 16th 2015 Contributor

A temporary patch would be the one I wrote on the first post adding:

if ( country.iso )

works for me.

I did not open a pull request because It looks like a dirt solution but if you approve I'll open it.

This Issue was closed on July 27th 2015
Powered by GitHub Issue Mirror