Navigation Menu

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-2.15.0-b8: Incorrect redirect on plugin deactivation #8828

Closed
Joey3000 opened this issue Sep 20, 2015 · 3 comments
Closed

piwik-2.15.0-b8: Incorrect redirect on plugin deactivation #8828

Joey3000 opened this issue Sep 20, 2015 · 3 comments
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Comments

@Joey3000
Copy link
Contributor

Test procedure:

  1. Install piwik-2.15.0-b8 in a subdirectory (e.g. /p) on a remote server (see installation issue on empty database: Unknown table engine 'InnoDB' #8824 for DB access issues on installation and afterwards)
  2. Log in as super-user and go to Administration -> Plugins
  3. Deactivate a plugin (e.g. ExampleAPI)

Expected results:
3. The Plugins page reloads (using correct redirect) with the plugin shown as inactive

Actual results:
3. Following redirect occurs: GET http://[...]/p/index.php?module=CorePluginsAdmin&action=deactivate&pluginName=ExampleAPI&nonce=b577c83c4293bc846f732510a5ed66f7 responds with status code 302 Found and header Location: http://[...]/ (i.e. the root directory of the Piwik installation domain).

There are two issues (which may have the same root cause) with that Location header:

  • The Piwik installation subdirectory (e.g. /p) is not considered - domain root is used instead
  • The index.php?module=CorePluginsAdmin&action=plugins&idSite=1&period=range&date=last30, etc., part is missing

That is all on a remote server with PHP 5.5.22, MySQL 5.1.73 with PDO\MYSQL.

Notes:

@tsteur
Copy link
Member

tsteur commented Sep 21, 2015

Are you using any browser plugins or is your server maybe removing the referrer? It is pretty much redirecting to $_SERVER['HTTP_REFERER'].

@tsteur
Copy link
Member

tsteur commented Sep 21, 2015

It should fallback to https://github.com/piwik/piwik/blob/2.15.0-b8/core/Url.php#L127-L169 if there is no referrer but possibly there's a bug maybe

@Joey3000
Copy link
Contributor Author

Are you using any browser plugins or is your server maybe removing the referrer? It is pretty much redirecting to $_SERVER['HTTP_REFERER'].

That was it, thanks! I do indeed use a referrer overwriting plugin and it was misconfigured to send the domain root directory. I'm sorry for the trouble. Closing this as Piwik 2.14.3 behaves the same way (the issue did not appear with it on my tests just because it was on a different domain, with correct referrer forwarding).

@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

No branches or pull requests

3 participants