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:
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?
@Findus23 is this as a result of the Matomo 4 upgrade or was this maybe working before?
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.
I guess that check is already a few years old. So might make sense to complete rewrite that with more useful thing.
So imho we should have these types of results:
Recommended Provider installed and activated
--> Result: OK
Currently selected Provider has an error
--> Result: Error (with error message from provider)
Default provider is in use
--> Result: Warning (Suggest to use another provider that does real geolocation)