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

Fixes regression for not working embedded widgets #8330

Merged
merged 2 commits into from Jul 12, 2015
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jul 11, 2015

fixes #8321

@sgiehl sgiehl added Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. 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 Jul 11, 2015
@sgiehl sgiehl added this to the 2.14.1 milestone Jul 11, 2015
@@ -323,6 +323,10 @@ private static function forceReloadAuthUsingTokenAuth($tokenAuth)

private static function shouldReloadAuthUsingTokenAuth($request)
{
if (is_null($request)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Problem is, that $request is null. So the Auth was never reloaded.
I had searched for a better solution. But I didn't find another without changing the current logic.
There seems to be no way to determine whether a parameter is set in the request but empty. Common::getRequestVar() returns the default (or throws exception) if the parameter is missing or empty. Imho returning the empty value would be correct here, but I guess that might break other stuff in piwik to change that behavior.

@mattab
Copy link
Member

mattab commented Jul 12, 2015

Imho returning the empty value would be correct here, but I guess that might break other stuff in piwik to change that behavior.

If you think it would be correct behavior, maybe it's worth trying the correct fix and see if all our tests would still pass? it may be a bit risky but in general it's worthwile trying the "Correct fix approach" in case it may just work :-)

And kuddos for this PR! 👍

@sgiehl
Copy link
Member Author

sgiehl commented Jul 12, 2015 via email

@mattab
Copy link
Member

mattab commented Jul 12, 2015 via email

@mattab
Copy link
Member

mattab commented Jul 12, 2015

looks good, thanks for looking into this regression @sgiehl

Added tiny commit 1b30b7f

mattab pushed a commit that referenced this pull request Jul 12, 2015
Fixes regression for not working embedded widgets
@mattab mattab merged commit 476e49e into master Jul 12, 2015
@mattab mattab deleted the 8321_embedded_widgets branch July 12, 2015 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. 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

3 participants