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

Post Event only to activated plugins #4357

Closed
tsteur opened this issue Nov 28, 2013 · 19 comments
Closed

Post Event only to activated plugins #4357

tsteur opened this issue Nov 28, 2013 · 19 comments
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Nov 28, 2013

Currently, events are posted to all loaded plugins, not all activated plugins.

This results for instance in including JavaScript files of deactivated plugins if merge_assets are disabled, it results in Fatal Errors if a deactivated plugin listens to events and produces a fatal error etc.

@tsteur
Copy link
Member Author

tsteur commented Dec 3, 2013

In e3082f7: refs #4357 post event only to activated plugins, fixed most fatals but still differences in output

@tsteur
Copy link
Member Author

tsteur commented Dec 3, 2013

In 174bf3b: refs #4357 this should fix the core tests

@tsteur
Copy link
Member Author

tsteur commented Dec 3, 2013

In aad58ac: refs #4357 this should fix some integration tests but not sure about the side effects

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

In 04326ba: refs #4357 post event only to activated and loaded plugins. Usually an activated plugin should be loaded anyway, but this seems not to be the case in tests where plugins are sometimes manually unloaded. Another solution would be to remove the plugin from activated plugins list ($pluginsToLoad) when unloadPlugin() is called. Not sure about side effects

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

In 71f1845: refs #4357 fix more tests

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

In 034742a: refs #4357 make sure plugin name is set

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

In d323058: refs #4357 probably a better fix to make the integration tests working

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

In e3e45c7: refs #4357 revert unloading plugins again, could not find another way to pass all the tests

@tsteur
Copy link
Member Author

tsteur commented Dec 4, 2013

Tests are green but not sure if it is safe to merge... See email

@mattab
Copy link
Member

mattab commented Dec 9, 2013

made a change in master:

  • Tests now activate plugins explicitely. 75b1b44

@mattab
Copy link
Member

mattab commented Feb 1, 2014

@thomas, thanks for the investigation. Could you check whether the problem is still found in Piwik, that events are posted to the disabled plugins? If so, i'd like to have this fixed.

Otherwise if the problem was fixed somehow, maybe we can close this ticket?

@mattab
Copy link
Member

mattab commented Mar 3, 2014

In f96c0f1: Fixes #4357 Merging branch into master, let's see if the build stays green

@mattab
Copy link
Member

mattab commented Mar 3, 2014

In b647357: Refs #4357 Not fully working, so reverting

@mattab
Copy link
Member

mattab commented Apr 7, 2014

In e6ffa98: Refs #4357 only post events to activated plugins.
ticket is not fixed because I think other calls to getLoadedPlugins() should maybeu use this new function getPluginsLoadedAndActivated() instead.

@mattab
Copy link
Member

mattab commented Apr 7, 2014

In 4c9d0c3: A proper hack to be removed soon ummmmmmok? Refs #4357

@mattab
Copy link
Member

mattab commented Apr 12, 2014

In bc19503: Refs #4357 let's see how build behaves with this change?

@mattab
Copy link
Member

mattab commented Apr 12, 2014

Fixed and tests are now passing. Had to resort to hacks to make them pass on travis f94ea2e

@mattab
Copy link
Member

mattab commented Apr 14, 2014

In ab2e09e: Refs #4357 Only add Javascript and CSS files from activated plugins.

@mattab
Copy link
Member

mattab commented Apr 14, 2014

In 7f59bbb: Revert previous commit, this was wrong. Instead use: getPluginsLoadedAndActivated() to load only activated plugins. refs #4357

@tsteur tsteur added this to the 2.2.1 - Piwik 2.2.1 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants