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

After a plugin update, a blank page may be shown because of a fatal error #9780

Open
tsteur opened this issue Feb 15, 2016 · 0 comments
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Stability For issues that make Matomo more stable and reliable to run for sys admins.

Comments

@tsteur
Copy link
Member

tsteur commented Feb 15, 2016

When updating a plugin, we update the plugin, and then render the page "plugin was updated" or similar.

Instead of rendering the plugin page we should ideally perform a redirect to this "plugin was updated" page, otherwise it may result in a blank page.

Imagine we update the code of a plugin, say AnonymousPiwikUsageMeasurement. During the request we bootstrap Piwik, perform a couple of tasks, many instances are created and stored in the DI container.

Problem: Some of the instances stored in DI might change because of the plugin update. For example there might be suddenly a new setting in a Settings class. When then some code is trying to access this property a fatal error occurs, because we still have the old instance in DI and the old instance might be also used in other objects.

As we cannot easily just reset the DI container we should ideally just perform a redirect immediately after a plugin was updated. It may be even smart to not load the plugin immediately, but may be necessary in order to perform the plugin updates. Needs to be checked.

We had this case recently with AnonymousPiwikUsageMeasurement plugin where a new setting $anonymizeSelfPiwik was added. It should be possible to reproduce it by updating this plugin say from 0.1.X to 0.2.1

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Feb 15, 2016
@mattab mattab added this to the 3.0.0 milestone Mar 31, 2016
@mattab mattab added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Stability For issues that make Matomo more stable and reliable to run for sys admins. labels Dec 10, 2023
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. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Stability For issues that make Matomo more stable and reliable to run for sys admins.
Projects
None yet
Development

No branches or pull requests

2 participants