Skip to content

Commit cb34c66

Browse files
committed
Update to Matomo 5.3.3 and Fix TagManager
Why these changes are being introduced: Along with the 5.3.3 upgrade, we are enabling the TagManager plugin. We just discovered that the TagManager plugin had been enabled via the Matomo UI in Prod, but since this was never captured in the container definition here, it did not persist. NOTE: The steps documented in the HOWTO have already been followed in Dev1, Stage-Workloads, and Prod-Workloads. How this addresses that need: * Create a HOWTO to document the difficulty in enabling the TagManager plugin in our environment * Update the config.ini.php file to reflect the activation of the TagManager plugin * Update the Dockerfile to update to the latest version of Matomo Side effects of this change: None. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/WEB-2064 * https://mitlibraries.atlassian.net/browse/INFRA-526
1 parent 04eda4a commit cb34c66

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM matomo:5.3.1
1+
FROM matomo:5.3.2
22
# checkov:skip=CKV_DOCKER_2:Skipping HEALTHCHECK configuration for now
3-
# checkov:skip=CKV_DOCKER_3:Intentionally using root for the user
3+
# checkov:skip=CKV_DOCKER_3:The container actually runs as www-data user
44

55
# Add the EnvironmentVariables plugin
66
COPY ./files/plugin-EnvironmentVariables-5.0.3/ /var/www/html/plugins/EnvironmentVariables
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# TagManager core plugin activation
2+
3+
Turns out that the TagManager core plugin needs some extra care and attention if it wasn't initially enabled when first starting with Matomo. Attempting to activate it the usual way causes Matomo to break.
4+
5+
This GitHub Issue documents that problem and provides a simple (but strange) solution:
6+
7+
* [Issue: Can't install TagManager plugin because table _tagmanager_container is missing](https://github.com/matomo-org/matomo/issues/19474)
8+
9+
For our container-based deploy, this means
10+
11+
1. connect to the running container
12+
1. ensure that a simple text editor is available in the container
13+
1. deactivate the TagManager plugin: `./console plugin:deactivate TagManager`
14+
1. edit the config/config.ini.php file to remove the `PluginsInstalled[] = "TagManager"` line
15+
1. run the `core:update` command: `./console core:update` (nothing should happen)
16+
1. activate the TagManager plugin: `./console plugin:activate TagManager`
17+
1. run the `core:update` command again: `./console core:update` (nothing should happen)
18+
19+
The appropriate updates to the database will now be in place.
20+
21+
At this point, proceed with updates to this repository by updating the `config.ini.php` file to match the file from the container.

files/config.ini.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
Plugins[] = "CustomDimensions"
9797
Plugins[] = "FeatureFlags"
9898
Plugins[] = "MobileAppMeasurable"
99+
Plugins[] = "TagManager"
99100
Plugins[] = "CustomVariables"
100101
Plugins[] = "EnvironmentVariables"
101102
Plugins[] = "HeatmapSessionRecording"

0 commit comments

Comments
 (0)