@mnapoli opened this issue on August 17th 2015

Replaces #8482 that was opened against master.

Fixes #7978, replaces #8050

Problems: - Excluded User Agents is a comma-separated list, but user agents can contain commas - we want to let users wrap user agents in quotes (see https://github.com/piwik/piwik/issues/7978#issuecomment-121509999) which is currently not supported - the inline help for Excluded User Agents doesn't say how to format user agent strings (#7978) - other fields in the page ask for one item per line: - it's not consistent with Excluded User Agents (which is comma-separated), so it's confusing - in the code it's actually comma-separated, so it's clearly misleading and broken for some users

These problems apply to global and site-specific settings.

Goals: - [x] consistent formatting for all fields (and both global and site-specific settings) - [x] excluded user agents - [x] excluded query parameters - [x] excluded IPs - [x] it needs to be "one per line" because of user agents (that can contain commas) - [x] enclosing quotes need to be accepted (and trimmed) for user agents - [x] field helps need to match the actual behavior - [x] migration script - [x] tests - [x] update changelog regarding API changes

Notes: - enclosing quotes for user agents are trimmed (for the other fields I didn't think it would make sense) - the help text for user agents has also been updated (only the english version), it now explicitly says that user agents should be separated by new lines. What is the best course of action to ensure translations are updated? New translation key? - The following API methods are now returning an array of strings instead of a list encoded in CSV: - SitesManager.getExcludedIpsGlobal - SitesManager.getExcludedQueryParametersGlobal - SitesManager.getExcludedUserAgentsGlobal - The following API methods now accept values separated by new lines instead of commas: - SitesManager.setGlobalExcludedIps - SitesManager.setGlobalExcludedQueryParameters - SitesManager.setGlobalExcludedUserAgents

@mnapoli commented on August 17th 2015

This pull request contains commits from master that were not merged in 3.0. Master needs to be merged in 3.0 so that this branch can be merged (rebasing this branch with the intertwined history would be way too long, too complicated, and wouldn't fix the root issue).

@tsteur commented on August 30th 2016

@mattab I have to close this one. We need to have this fix in Piwik 3 but there all this logic completely changed as they are now all part of the "Plugin Settings / Fields API". There we can eventually make a change to the API and it will be applied everywhere a textarea with multiple entries is expected.

This issue was closed on August 30th 2016
Powered by GitHub Issue Mirror