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

Error with non-installed Piwik #7759

Closed
mnapoli opened this issue Apr 24, 2015 · 9 comments
Closed

Error with non-installed Piwik #7759

mnapoli opened this issue Apr 24, 2015 · 9 comments
Assignees
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@mnapoli
Copy link
Contributor

mnapoli commented Apr 24, 2015

Currently if we download Piwik but don't run the installer, the CLI console will not work. This is because the container doesn't have the config file of the Diagnostics plugin added, so the DiagnosticService cannot be created. This is the kind of issues I was trying to avoid in #7175.

I will fix this regression by getting the service lazily in the diagnostic:run command. However maybe this Diagnostics plugin should be enabled by default (even in no config.ini.php config exists). By the way I have no idea how the installer runs without loading some of the plugins. So the question is how do I make a plugin be loaded by default, even if Piwik is not installed?

@mnapoli mnapoli added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Apr 24, 2015
@mnapoli mnapoli added this to the Piwik 2.13.0 milestone Apr 24, 2015
mnapoli added a commit that referenced this issue Apr 24, 2015
@mnapoli
Copy link
Contributor Author

mnapoli commented Apr 24, 2015

First step done (fixed the console in de925df)

@mnapoli mnapoli self-assigned this Apr 24, 2015
@mattab
Copy link
Member

mattab commented Apr 24, 2015

So the question is how do I make a plugin be loaded by default, even if Piwik is not installed?

if you add the plugin to: $pluginToAlwaysActivate in Plugin\Manager it should do the trick

@saleemkce
Copy link
Contributor

@mnapoli okay great. But my point is, for a user cloning the piwik repository newly, after updating composer with CLI, it should work, right? or plus using command "git pull upstream master", the piwik site should load without issues because it's a fresh clone. But I kept getting PHP-DI class not found error. Okay, let me check it after a few hours because you have made commits and report it to you later.

@mnapoli
Copy link
Contributor Author

mnapoli commented Apr 24, 2015

@saleemkce could you restore the original composer.json, run composer install and copy-paste the error message here? Also where do you get this error message? In the CLI console or in the web interface?

@mattab I've tried this one but it doesn't seem to work. The comment says These are always activated and cannot be deactivated so I think it's just that we can't deactivate them, but if I add it to the list, remove my config and run ./console plugin:list I only see this list:

+---------------+-------------------+-----------+
| Plugin        | Core or optional? | Status    |
+---------------+-------------------+-----------+
| Installation  | Core              | Activated |
| SitesManager  | Core              | Activated |
| UsersManager  | Core              | Activated |
| CoreAdminHome | Core              | Activated |
| Login         | Core              | Activated |
+---------------+-------------------+-----------+

@saleemkce
Copy link
Contributor

@mnapoli Do you say that "composer.json" from this https://github.com/piwik/piwik/blob/master/composer.json ? Because now I am confused, because before using "git clone ... " I removed my local piwik folder completely + data base after taking backup. So "git clone ..." have provided only the latest composer.json. Am I right?

@mnapoli
Copy link
Contributor Author

mnapoli commented Apr 24, 2015

@saleemkce yes use the composer.json that was downloaded when you did git clone (which is the one you linked to)

@saleemkce
Copy link
Contributor

@mnapoli okay, as I am away from home and don't have access to local piwik application, I will report it later today. Thanks.

@saleemkce
Copy link
Contributor

@mnapoli Awesome, I replaced the composer.json and ran "composer install". My app is now back. The issue is PHP-DI is fixed by your latest commit. Thanks.

Additionally, could you please look into this http://forum.piwik.org/read.php?9,126057 and suggest me?

@mnapoli
Copy link
Contributor Author

mnapoli commented Apr 26, 2015

By the way I have no idea how the installer runs without loading some of the plugins.

Still don't know about that, I'm curious if you have an answer @mattab

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