./console --no-interaction doesn't work?


#1

Hi,

I’m trying to automate setting the number of custom variables in our environments using puppet.
The standard way of doing this is cd-ing to the piwik installation directory and running

./console customvariables:set-max-custom-variables {some-number}

However this prompts for a confirmation. Supposedly I can do

./console -n customvariables:set-max-custom-variables 6

but this doesn’t work. The output I get is

Scope "Page"
1 new custom variables having the index(es) 6 will be ADDED
Scope "Visit"
1 new custom variables having the index(es) 6 will be ADDED
Scope "Conversion"
1 new custom variables having the index(es) 6 will be ADDED

but it doesn’t actually set the number of custom variables. Doing

./console customvariables:info

reveals I still have the old number of custom variables.

Or is there any other alternative I can use to set the number of custom variables?


#2

I see the problem now. In https://github.com/piwik/piwik/blob/3.0/plugins/CustomVariables/Commands/SetNumberOfCustomVariables.php#L58 it’s not even checking if the user supplied a “–no-interaction” argument. I’m not familiar with php at all so any advice on how I can get the argument to perform a check on it would be appreciated. Thanks.


(Matthieu Aubry) #3

Hi there,

if you need something in new in Piwik and you have intuition something is a bug, please report it on our issue tracker where developers will see it and have a chance to help: Issues · matomo-org/piwik · GitHub