matomo-org / tag-manager

Free Open Source Matomo Tag Manager - A simple way to manage and maintain all of your (third-party) tags on your website.
https://matomo.org
GNU General Public License v3.0
168 stars 57 forks source link

Ensure environment id is set #800

Closed michalkleiner closed 1 month ago

michalkleiner commented 1 month ago

Description:

When debugging Dashboard UI tests locally I've seen the below warning several times

WARNING TagManager[2024-05-30 08:31:43.581651 UTC] [4c877] /Users/michal/Sites/matomo/plugins/TagManager/Context/WebContext.php(98): Warning - Undefined array key "id" - Matomo 5.2.0-alpha - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)

so this is adding a safeguard for cases when the ID is not defined. Seems like in UI tests the environments may not be always accessible or not have the ID set, not sure. This change should not affect anything else as far as I can tell.

Review