-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow social & search definitions to be sourced locally #18023
Allow social & search definitions to be sourced locally #18023
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a quick comment @samjf I haven't tested yet but code looks good. Still needs to be tested (by me or some other reviewer)
config/global.ini.php
Outdated
@@ -833,6 +833,10 @@ | |||
; If set to 1, when rearchiving reports in the past we do not rearchive segment data with those reports. Default is 0. | |||
rearchive_reports_in_past_exclude_segments = 0 | |||
|
|||
; If set to 1, then social and search engine definitions files will be downloaded from Matomo remotely to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are actually downloaded from github see https://github.com/matomo-org/matomo/blob/4.4.1/plugins/Referrers/Tasks.php#L33-L49 and not from Matomo. This is something we need to improve in the future to "proxy" or serve them through Matomo servers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsteur Thanks for that. I've made a change based on your suggestion :)
refs matomo-org/matomo#18023 still keeping additionally though the checks to just ignore the tasks in https://github.com/matomo-org/matomo-for-wordpress/blob/4.4.2/plugins/WordPress/WordPress.php#L113-L114 just to make sure they won't be executed
Description:
Issue: DEV-2088
Introduced functionality:
This change allows Matomo to source search + social definitions yaml files locally, instead of reading them from remotely sourced updates.
If the introduced configuration variable is changed to 0 (false) then it will only ever load social and search definitions from the local YML files packaged with Matomo.
Existing behavior
How it works at the moment is that a weekly task will fetch the latest definition files from Matomo github. It will store this in the the Option table and retrieve it from the option table when definitions are requested and there is a cache miss.
Review