@Findus23 opened this Issue on September 11th 2020 Member

I looked into the GeoIP system check and I am completly confused by both the code and the warnings Matomo gives:

When I set up Matomo with the default geolocation provider, I get the following warning in the system check:
Geolocation works, but you are not using one of the recommended providers. If you have to import log files or do something else that requires setting IP addresses, use the PHP GeoIP 2 implementation</a> and install <a href="https://matomo.org/docs/geo-locate/" rel="noreferrer noopener" target="_blank">maxminddb extension.
The HTML is broken and it recommends users to install maxminddb, something nearly nobody should need to do.

Looking at the code doesn't really clear anything up:
https://github.com/matomo-org/matomo/blob/115527353a9e75e01aa4d263408956ae45403bea/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php#L45-L65

The warning I expect most people to see there (DefaultLocationProviderDesc1) is only displayed if !$isProviderInstalled which only happens if the status of the currently selected geolocation provider is not INSTALLED, but the default provider is obviously always installed, so I think noone ever sees the warning that provides the actual help.

I also can't think of a combination of mixed up translation strings or conditions that would make sense.

@sgiehl, do you know more about how this is supposed to work?

@tsteur commented on September 13th 2020 Member

@Findus23 is this as a result of the Matomo 4 upgrade or was this maybe working before?

@Findus23 commented on September 14th 2020 Member

The only change I can see in those files is https://github.com/matomo-org/matomo/pull/15521/files#diff-37504b398acb93a27b5550d760b3c96d, but that only moved the translations and didn't change them (I think).

And indeed switching to the default geolocation in 3.14.1 shows the same message.

Powered by GitHub Issue Mirror