matomo-org / plugin-DeviceDetectorCache

Makes tracking in Matomo Analytics faster by detecting many devices, operating systems, bots, and browsers from a cache.
https://matomo.org
GNU General Public License v3.0
3 stars 7 forks source link

Plugin does not seem to listen to config #14

Closed gerard76 closed 3 years ago

gerard76 commented 3 years ago

My config:

head -n25 config.ini.php 
; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Matomo; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "***"
username = "matomo"
password = "***"
dbname = "matomo"

[General]
force_ssl = 1
salt = "89a3676b1e60866d0638704623716a**"
trusted_hosts[] = "***"
trusted_hosts[] = "***"
trusted_hosts[] = "***"

[DeviceDetectorCache]
access_log_path = "/var/log/nginx/access.log"
access_log_regex = "/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] \"(\S+) (.*?) (\S+)\" (\S+) (\S+) \"([^\"]*)\" \"([^\"]*)\"$/"
regex_match_entry = 14
num_cache_entries = 200000

[Plugins]
Plugins[] = "CorePluginsAdmin"
Plugins[] = "CoreAdminHome"
Plugins[] = "CoreHome"

Running php ./console device-detector-cache:warm-cache -vvv

Gives me the error:

Screenshot 2020-10-08 at 15 15 30
tsteur commented 3 years ago

Hi @gerard76 are you using this with Matomo 3 or Matomo 4?

gerard76 commented 3 years ago

3.14.1

gerard76 commented 3 years ago

Let me upgrade that I thought I accidentally installed an old version.

tsteur commented 3 years ago

@gerard76 I just checked again and this should work. We're using it as well and works nice for us. For some reason it seems to use the default value for the access log path instead of your configured path for the nginx access log file.

Any chance you have maybe a multi server setup and the config file was for example not updated everywhere? Or maybe the config file contains another section [DeviceDetectorCache]?

gerard76 commented 3 years ago

Garghhh. Activating the plugin added the lines! I thought I had to add them and did...sorry to have bothered you. Thanks for pointing me in the right direction.