Open tomjensendk opened 1 year ago
Hi @tomjensendk . That's very strange. Is there any error in your logs just before the deprecation error? The third parameter should be the content of debug.twig, retrieved by the call to this method. The only reason I can think of for that not being populated is a permission issue. If you have preview mode enabled while creating a new variable, try disabling it while creating the variable and then enable preview/debug mode after the new variable has been saved.
Hi @snake14 Disabling preview mode get the error out of sight for the users, there is nothing else in the logs except that error message.
The user whom I testing with has "view" on a website and Tag Mamager: Write + Tag Manager: Publish Live Container and Tag Manager: Use Custom Template if that makes a difference - when I use an Superuser account I do not get the error so I guess it is related to access rights somehow but I do not think I can give any more rights and Tag Manager level?
Hi @tomjensendk . Yes. That sounds like the issue. The loading of the debug template expects the user to have write access for at least one site. So, you're requesting that a view user with TagManager Write access be able to view the debug? I think that makes sense. I'm thinking that permission check could be updated to check the TagManager permission level. That seems like a good improvement request. However, it will probably only be included in Matomo 5.x as there aren't currently any further releases planned for Matomo 4.x.
Hi
When for instance creating new variables in TagManager we are getting the error
/matomo/plugins/TagManager/Context/WebContext/JavaScriptTagManagerLoader.php(73): Deprecated - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated - Matomo 4.15.0
PHP Version 8.1.2-1ubuntu2.14
Variables etc. are created but the user is shown an error message.
Please advice