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

piwik (matomo) plugin - malformed URL #4763

Closed
ctgraham opened this issue May 14, 2019 · 6 comments · Fixed by pkp/piwik#6
Closed

piwik (matomo) plugin - malformed URL #4763

ctgraham opened this issue May 14, 2019 · 6 comments · Fixed by pkp/piwik#6
Assignees

Comments

@ctgraham
Copy link
Collaborator

Describe the bug
https://forum.pkp.sfu.ca/t/ojs-v3-1-2-piwik-plugin-error/53349/2

OJS seems to change the piwik url which I insert into the configuration of the plugin. It changes the url from https://piwik.ub.uni-muenchen.de to //https://piwik.ub.uni-muenchen.de/

To Reproduce
Steps to reproduce the behavior:

  1. Enable and configure piwik plugin
  2. View HTTP requests made against matomo URL

What application are you using?
OJS or OMP version 3.1.2

Additional information
Piwik plugin Settings form requires a URL:
https://github.com/pkp/piwik/blob/910bfd6b6464fb383dc7d476771d9551b8d6b308/PiwikSettingsForm.inc.php#L38
as of
pkp/piwik@e78646c

This setting is used as if it is a DNS name, or DNS name + path:
https://github.com/pkp/piwik/blob/910bfd6b6464fb383dc7d476771d9551b8d6b308/PiwikPlugin.inc.php#L122

@ctgraham
Copy link
Collaborator Author

If we let (require) the user enter a full URL with protocol, we'll need to either require this be https to prevent failure of mixed protocol requests, or we'll need to strip the protocol before usage.

If we let the user enter just a arbitrary DNS + path, we need to clarify the expectation within the form. The form error currently says "http://" is required.
https://github.com/pkp/piwik/blob/910bfd6b6464fb383dc7d476771d9551b8d6b308/locale/en_US/locale.xml#L24

@ctgraham
Copy link
Collaborator Author

@dennmuel , @mpbraendle, can you test the proposed PR?

@ctgraham ctgraham self-assigned this May 14, 2019
@mpbraendle
Copy link
Contributor

Works on our test server. Thank you.

@dennmuel
Copy link
Contributor

Same here. :) Thanks!

asmecher added a commit to pkp/piwik that referenced this issue May 14, 2019
pkp/pkp-lib#4763: Replace full URL with protocol relative URL.
@asmecher
Copy link
Member

Thanks, @ctgraham!

@asmecher
Copy link
Member

Added a new release of Piwik (v1.0.2-1) to the plugin gallery with this fix included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants