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

Cookie warning pops up in IE11 ShowModalDialog #14495

Merged
merged 5 commits into from Aug 16, 2019

Conversation

siva538
Copy link
Contributor

@siva538 siva538 commented May 28, 2019

Issue with ShowModalDialog in IE browser is fixed.
fixes #11507

@Findus23 Findus23 added the Needs Review PRs that need a code review label May 28, 2019
@siva538
Copy link
Contributor Author

siva538 commented May 30, 2019

Reviewer, also quick note on the piwik.js file being modified. It was assumed that the minified version of the file would be generated as part of build process, and hence explicitly not modified.

Please let me know if anything else needs to be done along with this JS file.

@mattab mattab added this to the 3.11.0 milestone Jun 10, 2019
@diosmosis
Copy link
Member

The change looks ok to me, if we can set a cookie properly, that should be enough. To be safe though, we could surround the test in a try-catch. What do you think @tsteur ?

@tsteur
Copy link
Member

tsteur commented Jun 25, 2019

Sounds good @diosmosis
does it make sense to simply return '0' on any error as we probably can't rely on navigatorAlias.cookieEnabled in this case?

@diosmosis
Copy link
Member

Yes, makes sense, if something bad happens when we try and set a cookie, we can't set a cookie.

@siva538
Copy link
Contributor Author

siva538 commented Jun 29, 2019

Thanks @diosmosis and @tsteur for your feedback. Is there any action item from my side or will you be able to help merge this change?

@tsteur
Copy link
Member

tsteur commented Jun 29, 2019

There is nothing that needs to be done. We will include this in the 3.11 release. There's not enough testing time for 3.10 release unfotunately.

@tsteur
Copy link
Member

tsteur commented Jul 17, 2019

image
Actually, I couldn't reproduce the warning @siva538

FYI: I always got "Access denied" when using showModalDialog until I realised you need to turn off the popup blocker in IE10/11 for it to test.

In general I was worried removing cookieEnabled check that hasCookies() might always return true cause in the end we're simply writing a property on document.cookie=... and reading the same property within the same request. I only tested latest Chrome and Firefox and IE11 but seems like browsers actually won't store any value on document.cookie when cookies are disabled. So it looks like merging the PR will be fine and the browser doesn't start treating this property like any regular property.

Couldn't find a blame why this check was added initially to see if it causes any problem maybe c654e73#diff-1279d666063b65e6d6777f902d11574f

@mattab not sure if there could be any regression or problem with it but suppose it should be fine.

At the same time popups are blocked by default in IE and not sure where this method showModalDialog actually works.

Assuming all browsers hopefully behave the same it should be fine to merge.

@mattab mattab modified the milestones: 3.11.0, 3.12.0 Jul 23, 2019
@ibril15
Copy link

ibril15 commented Jul 25, 2019

Not sure if you're still having problems reproducing or not, but the file below should help. You can open it in IE11 straight from your desktop, just hit "Allow Blocked Content" at the bottom if you get prompted.

testmodalpopup.zip

@siva538
Copy link
Contributor Author

siva538 commented Aug 5, 2019

To re-iterate, this is an important fix that is causing lot of problems with the manual code modifications to piwik.js file and yet times it is getting overwritten and resulting in production critical issues.

Thanks for your help and understanding. Please let us know if you can merge this for 3.12.

@mattab
Copy link
Member

mattab commented Aug 9, 2019

@tsteur Reckon we can just merge it. In the worst case it would regress the accuracy of tracking how many users support Cookies. I'll set a reminder to check the reports in 2 months.

@tsteur
Copy link
Member

tsteur commented Aug 12, 2019

Sweet, this PR is good to merge. We just need to update the minified tracker version afterwards.

@diosmosis diosmosis merged commit 0602928 into matomo-org:3.x-dev Aug 16, 2019
@diosmosis
Copy link
Member

Just merged, thanks @siva538 for the great first contribution!

@mattab mattab changed the title 11507 - Cookie warning pops up in IE11 ShowModalDialog Cookie warning pops up in IE11 ShowModalDialog Oct 25, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cookie warning pops up in IE11 ShowModalDialog
6 participants