@futureweb opened this issue on April 14th 2015

Hello,

I guess it would make sense to put a trim() around each Site Search Parameter you can configure for specific Sites / default for all Sites. I had: "query, searchquery" instead of "query,searchquery" (note the Space) - and searchquery was not tracked as internal Site Search ... As a Space will never occur within an URL it should be stripped away.

Bye from Austria Andreas Schnederle-Wagner

@mattab commented on April 16th 2015

Hi @futureweb

thanks for the suggestion! It makes a lot of sense that when reading the list of parameter we should apply a white space trim.

@tsteur commented on April 30th 2015

In which browser is this happening? I tried to reproduce in latest Chrome and Firefox but couldn't.

@futureweb commented on May 4th 2015

Was tested with latest FF When Site Search Params contained Space - the second was not recognized as Site Search within Live Tab. As soon as I removed the Space - it showed up as a Search

@tsteur commented on May 4th 2015

Did you have this problem with "Global Websites Settings" or on a specific site? Do you remember when you configured it initially (approx., it would be enough to know like 1 month ago, 6 months ago, ...)? Which Piwik version are you using?

Can you maybe try to reproduce it again, and then execute those SQL queries (if possible) and post the output:

select * from piwik_option where `option_name` = 'SitesManager_SearchKeywordParameters';
select sitesearch_keyword_parameters from piwik_site;

You could change the value back directly afterwards again to make sure it works again.

Background: I prepared a possible patch that makes sure that values will be trimmed but I still cannot reproduce it. I would like to be able to reproduce it before we apply this patch. In theory angular should take care of trimming each value as there is a <input ng-list ng-model="searchParameters">. Maybe there was a bug in angularjs in a previous Piwik version.

@futureweb commented on May 5th 2015

Using latest Version, it's configured as Global Setting - never touched since initial Install - which is ago some years. Wasn't able to reproduce it now - maybe the trim() on save was already introduced in a Version after I configured this Setting - or as you say - maybe there was a Bug in angular?!

Output for booth Queries: query,searchquery (without Space - even if Space is shown in Output of Configuration Page)

@tsteur commented on May 5th 2015

Perfect, there was probably a bug before we converted it to angular.

Cheers

This issue was closed on May 5th 2015
Powered by GitHub Issue Mirror