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

Improve detection of piwik/matomo URL #13122

Merged
merged 1 commit into from Jul 2, 2018
Merged

Improve detection of piwik/matomo URL #13122

merged 1 commit into from Jul 2, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jul 1, 2018

refs #11029

For some reason that I cannot explain, it stored 127.0.0.1 as the matomo URL in the DB causing a bug in tag manager. So I opened a regular page in Matomo and was expecting it to correct the value in the option table but it didn't. I think this is because of the above change where it checks whether the previous URL is not a local host whereas it maybe should check on the current URL?

See the debugger picture where it did not overwrite 127.0.0.1 with the correct current url/host because the host is currently a local host (127.0.0.1). If it checked whether the actual host is a local host, it would have updated it.

image

Unfortunately, I don't know why it would have stored 127.0.0.1 in the first place. This is still another issue.

refs a couple of issues I think. Eg #11029 

For some reason that I cannot explain, it stored `127.0.0.1` as the matomo URL in the DB causing a bug in tag manager. So I opened a regular page in Matomo and was expecting it to correct the value in the option table but it didn't. I think this is because of the above change where it checks whether the previous URL is not a local host whereas it maybe should check on the current URL? 

See the debugger picture where it did not overwrite 127.0.0.1 with the correct current url/host because the host is currently a local host (127.0.0.1). If it checked whether the actual host is a local host, it would have updated it.
@tsteur tsteur added the Needs Review PRs that need a code review label Jul 1, 2018
@tsteur tsteur added this to the 3.6.0 milestone Jul 1, 2018
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

makes sense

@sgiehl sgiehl merged commit 072e46d into 3.x-dev Jul 2, 2018
@sgiehl sgiehl deleted the 11029 branch July 2, 2018 09:10
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
refs a couple of issues I think. Eg matomo-org#11029 

For some reason that I cannot explain, it stored `127.0.0.1` as the matomo URL in the DB causing a bug in tag manager. So I opened a regular page in Matomo and was expecting it to correct the value in the option table but it didn't. I think this is because of the above change where it checks whether the previous URL is not a local host whereas it maybe should check on the current URL? 

See the debugger picture where it did not overwrite 127.0.0.1 with the correct current url/host because the host is currently a local host (127.0.0.1). If it checked whether the actual host is a local host, it would have updated it.
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.

None yet

2 participants