Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Search Parameters - extra trailing white space cause no site search tracked #7678

Closed
futureweb opened this issue Apr 14, 2015 · 6 comments
Assignees
Labels
worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@futureweb
Copy link
Contributor

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 mattab changed the title Site Search Parameters Site Search Parameters - extra trailing white space cause no site search tracked Apr 16, 2015
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 16, 2015
@mattab
Copy link
Member

mattab commented Apr 16, 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.

@mattab mattab added this to the Piwik 2.14.0 milestone Apr 16, 2015
@mattab mattab added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Apr 16, 2015
@tsteur
Copy link
Member

tsteur commented Apr 30, 2015

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

@futureweb
Copy link
Contributor Author

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
Copy link
Member

tsteur commented May 4, 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
Copy link
Contributor Author

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
Copy link
Member

tsteur commented May 5, 2015

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

Cheers

@tsteur tsteur closed this as completed May 5, 2015
@tsteur tsteur added worksforme The issue cannot be reproduced and things work as intended. and removed Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels May 5, 2015
@tsteur tsteur self-assigned this May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants