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
174 stars 58 forks source link

Bug: Changing name of variable causes removing trigger in a tag #110

Closed ben-dw closed 6 years ago

ben-dw commented 6 years ago

If you use a variable in a tag, eg "const.enviroment" and you rename to "environment" the trigger will be removed.

image

tsteur commented 6 years ago

Where exactly is the trigger removed? Can you maybe explain the steps to reproduce this?

When you rename a variable, it shouldn't remove anything but update the variable name on all references in tags and triggers in https://github.com/matomo-org/tag-manager/blob/master/Model/Variable.php#L223-L260

ben-dw commented 6 years ago

It doesn't matter which tag you use, as I have tested several. eg. Honeybadger - I have used a variable called "const.environment". The trigger was set up to "All pages". I had to change the variable name to "environment". Checking the tags, the variable was updated, but the trigger was removed from the tag. The trigger itself still exists.

tsteur commented 6 years ago

Cheers 👍 working on a fix right now