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

wp plugin update-all enters maintenance mode even when no updates are available #491

Closed
om4james opened this issue Jun 5, 2013 · 6 comments · Fixed by #492
Closed

wp plugin update-all enters maintenance mode even when no updates are available #491

om4james opened this issue Jun 5, 2013 · 6 comments · Fixed by #492

Comments

@om4james
Copy link

om4james commented Jun 5, 2013

When executing wp plugin update-all on a site with no plugin updates, the output is as follows:

Enabling Maintenance mode... Disabling Maintenance mode... Success: Updated 0/0 plugins.

I think ideally we shouldn't enter maintenance mode at all if no updates are available.

I suspect theme and possibly core updates might need the same enhancement as well.

@scribu
Copy link
Member

scribu commented Jun 5, 2013

WP-CLI just uses the bulk upgrader from WordPress, so you should file a bug upstream:

http://core.trac.wordpress.org/

@om4james
Copy link
Author

om4james commented Jun 5, 2013

Thanks for the quick reply.

Upon further investigation, this only occurs when using WordPress Multisite:

wp plugin update-all Enabling Maintenance mode... Disabling Maintenance mode... Success: Updated 0/0 plugins.

Normal WordPress simply outputs:

wp plugin update-all Success: Updated 0/0 plugins.

I agree though @scribu, sounds like a fix is needed in WordPress core.

@om4james
Copy link
Author

om4james commented Jun 5, 2013

@scribu, this commit is one way to fix this in wp-cli.

The other would be for me to submit a patch for WordPress core that adds checks to Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade() only act if the array passed to them isn't empty.

@scribu
Copy link
Member

scribu commented Jun 5, 2013

The other would be for me to submit a patch for WordPress core that adds checks to Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade() only act if the array passed to them isn't empty.

Please do that anyway, regardless of what WP-CLI does.

@om4james
Copy link
Author

om4james commented Jun 5, 2013

Core bug report: http://core.trac.wordpress.org/ticket/24496
Pull Request: #492

Thanks @scribu.

@om4james
Copy link
Author

Core bug report: http://core.trac.wordpress.org/ticket/24496

This bug has now been fixed in core and will be included in WordPress 3.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants