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

Ensure segment param is used from url if no hash available #13512

Merged
merged 1 commit into from Oct 1, 2018

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Sep 30, 2018

When viewing widgets in widgetize mode, all parameters are directly contained in the query string instead of the hash. When appending a segment to the query string it wasn't automatically added to ongoing ajax request.

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Sep 30, 2018
@sgiehl sgiehl added this to the 3.6.1 milestone Sep 30, 2018
@@ -529,10 +529,16 @@ function ajaxHelper() {
*/
this._mixinDefaultGetParams = function (params) {

if (window.location.hash) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the hash isn't a valid query string (or has no segment), should we default to the segment in the URL?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought about it. but wasn't sure about any side effects. e.g. opening the dashboard with having a segment in the query string and in the hash. If it would be removed from the hash it would still load the one in query string which might not be correct/wanted

Copy link
Member

@diosmosis diosmosis Sep 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, not sure about that. Thought this was how it worked for other query params (like date/period), but maybe not... (or maybe it shouldn't) cc @mattab

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think the segment of the query string should be used if the one from the hash gets removed (be choosing no segment in UI)

@diosmosis diosmosis merged commit 9af4711 into 3.x-dev Oct 1, 2018
@diosmosis diosmosis deleted the widgetizesegment branch October 1, 2018 18:03
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants