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

Database is only updated on plugin activation #35

Closed
toolstack opened this issue Oct 9, 2015 · 2 comments
Closed

Database is only updated on plugin activation #35

toolstack opened this issue Oct 9, 2015 · 2 comments
Labels
[Status] In Progress Tracking issues with work in progress
Milestone

Comments

@toolstack
Copy link
Contributor

The current database update code is contained in the plugin activation hook, however this hook is not fired when a plugin upgrade occurs.

This code should be moved outside of the activation function.

@toolstack toolstack self-assigned this Oct 9, 2015
@toolstack toolstack added the [Status] In Progress Tracking issues with work in progress label Oct 9, 2015
@bradt
Copy link
Contributor

bradt commented Oct 13, 2015

👍

@toolstack
Copy link
Contributor Author

As per the discussion during the weekly meeting (https://wordpress.slack.com/archives/glotpress/p1444915779000075), the upgrade check should only be run on the admin pages.

Concerns with this are that if a user has enabled auto update of plugins new features may not be functional (or worse the plugin may fail) until the admin has visited the backend. To mitigate this conditional code needs to be added to ensure no new features that require the update code to run are used until after it has run.

Running the upgrade process on every page load avoids this concern but does potentially has other side effects for the page load that it runs on (if there is a long upgrade process required the user of that page load may see a delay in loading or a complete failure or error message).

Both have pros and cons and running only during admin page loads received the most votes during the meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

No branches or pull requests

3 participants