Make WordPress Core

Opened 7 years ago

Last modified 3 weeks ago

#48364 new enhancement

(Needs confirmation) When updating plugins, WordPress won't update any new plugin updates that are found

Reported by: pikamander2 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Upgrade/Install Version: 5.2.3
Severity: minor Keywords: has-patch has-unit-tests
Cc: Focuses: ui, administration

Description

On a number of occasions, I've noticed that when I go to wp-admin/update-core.php and tell it to update my plugins, the system will:

  1. Update most of the plugins
  2. Report that all the plugins were successfully updated
  3. Still report that a few plugins need to be updated

That's very confusing to end users, because how can there be more plugin updates if all of their plugins were supposedly just updated?

I've seen that bug happen many times, but only just now did I notice something else; after you click the "Update Plugins" button, the little orange notification number will sometimes increase after a second or two. That makes me think that the update function is checking for new updates but not adding them to the list of plugins to update.

Since the only plugins that get updated are the ones that were "checked", it does make sense that new updates wouldn't automatically be added. That said, the process still seems clunky overall.

Maybe it would be better to check for updates before the wp-admin/update-core.php page loads? That way the user would be presented with the actual list of plugins that need to be updated, rather than a partial list. It would block the page load for a few seconds, which is undesirable, but in most cases I think that would be a better behavior that the current one, which occasionally requires you to update your plugins twice and gives little explanation of what's going on.

Note that there's a lot of partial speculation above, and the nature of this issue makes it hard to consistently reproduce.

Change History (3)

#1 @SergeyBiryukov
7 years ago

  • Component GeneralUpgrade/Install
  • Focuses ui administration added

This ticket was mentioned in PR #12346 on WordPress/wordpress-develop by @arkaprabhachowdhury.


2 months ago
#2

  • Keywords has-patch has-unit-tests added

This makes the bulk plugin updater return link open the Updates screen with a forced check, and makes force-check=1 refresh plugin and theme update data for users with the relevant capabilities. This avoids returning from a successful plugin bulk update to stale plugin update rows.

Validation:

  • php -l src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
  • php -l src/wp-admin/update-core.php
  • php -l tests/phpunit/tests/admin/wpUpgrader.php
  • php vendor/bin/phpcbf --standard=phpcs.xml.dist src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php src/wp-admin/update-core.php tests/phpunit/tests/admin/wpUpgrader.php
  • php vendor/bin/phpcs --standard=phpcs.xml.dist src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php src/wp-admin/update-core.php tests/phpunit/tests/admin/wpUpgrader.php
  • node tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit tests/phpunit/tests/admin/wpUpgrader.php --filter test_bulk_plugin_upgrader_skin_updates_page_link_should_force_check
  • node tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit tests/phpunit/tests/admin/wpUpgrader.php

#3 @arkaprabhachowdhury
3 weeks ago

Opened [PR #12346](https://github.com/WordPress/wordpress-develop/pull/12346) to address this ticket. This makes the bulk plugin updater return link open the Updates screen with a forced check, and makes force-check=1 refresh plugin and theme update data for users with the relevant capabilities. This avoids returning from a successful plugin bulk update to stale plugin update rows. Validation: - php -l src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php - php -l src/wp-admin/update-core.php - php -l tests/phpunit/tests/admin/wpUpgrader.php - php vendor/bin/phpcbf --standard=phpcs.xml.dist The PR includes focused regression coverage, and its validation details are recorded in the PR description.

I picked this up because the ticket describes a concrete core behavior or edge case that remains relevant in current WordPress. The proposed change is intentionally scoped to the ticket and is submitted here for code review, with the technical discussion remaining on this ticket.

Note: See TracTickets for help on using tickets.