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

RequestProcessors are used even if the plugin is not installed yet #9201

Closed
tsteur opened this issue Nov 12, 2015 · 1 comment
Closed

RequestProcessors are used even if the plugin is not installed yet #9201

tsteur opened this issue Nov 12, 2015 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Nov 12, 2015

I think only checking for loaded might result in this error but not sure: https://travis-ci.org/piwik/piwik/jobs/90662653#L1158

FastCGI sent in stderr: "PHP message: Error in Piwik (tracker): Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'last_idlink_va' in 'field list' In query: SELECT visit_last_action_time, visit_first_action_time, idvisitor, idvisit, user_id, visit_exit_idaction_url,

Point is some plugins may need ours to install. For example when they add columns to log tables. Imagine a plugin defines a new column for a log table which takes 10 hours to install. In these 10 hours the code of the not yet installed plugin will be already used as it is considered activated. This will lead to tracking errors for 10 hours as the data cannot be written into the table as the new column does not exist yet.

We considered this already when using components (check for $this->getPluginsLoadedAndActivated()) but eg not in DI when checking for config files https://github.com/piwik/piwik/blob/2.15.1-b1/core/Container/ContainerFactory.php#L134 . This is eg a problem with DI 'tracker.request.processors' as request processor will be already used even though the plugin is not installed yet.

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Nov 12, 2015
@tsteur
Copy link
Member Author

tsteur commented Nov 12, 2015

One problem that can occur when changing this behaviour is that a plugin installer might actually need to use some stuff from its config/config.php and therefore maybe needs to be loaded. Ideally we maybe refactor 'tracker.request.processors' to use Components and to work automatically instead of using DI

@tsteur tsteur added this to the 2.15.1 milestone Nov 12, 2015
@tsteur tsteur self-assigned this Nov 12, 2015
@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. and removed not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Nov 12, 2015
@tsteur tsteur changed the title A plugin should be only considered activated when being installed and loaded RequestProcessors are used even if the plugin is not installed yet Nov 12, 2015
@tsteur tsteur reopened this Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

1 participant