-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update yahnis-elsts/plugin-update-checker
from 4.13 to 5.1
#555
Conversation
I'm having a bit trouble reproducing step (4). I'll investigate it tomorrow. |
If you're on multisite, you'll need to go to the network plugins screen to see updates (this caught me when testing). If you have caching in place, that may also play a role and will need to be flushed |
@Sidsector9 I also face the same issue. I resolved it by re-installing composer packages and node packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkotter I noticed the following error in debug.log. Can you check?
[08-Aug-2023 06:50:09 UTC] PHP Notice: Trying to get property 'filename' of non-object in /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-content/plugins/classifai/includes/Classifai/Admin/Update.php on line 91
[08-Aug-2023 06:50:09 UTC] PHP Stack trace:
[08-Aug-2023 06:50:09 UTC] PHP 1. {main}() /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-admin/update-core.php:0
[08-Aug-2023 06:50:09 UTC] PHP 2. require_once() /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-admin/update-core.php:10
[08-Aug-2023 06:50:09 UTC] PHP 3. do_action($hook_name = 'load-update-core.php') /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-admin/admin.php:385
[08-Aug-2023 06:50:09 UTC] PHP 4. WP_Hook->do_action($args = [0 => '']) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/plugin.php:517
[08-Aug-2023 06:50:09 UTC] PHP 5. WP_Hook->apply_filters($value = '', $args = [0 => '']) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/class-wp-hook.php:334
[08-Aug-2023 06:50:09 UTC] PHP 6. wp_update_plugins($extra_stats = '') /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/class-wp-hook.php:310
[08-Aug-2023 06:50:09 UTC] PHP 7. set_site_transient($transient = 'update_plugins', $value = class stdClass { public $last_checked = 1691477409; public $response = ['autoshare-for-twitter/autoshare-for-twitter.php' => class stdClass { ... }, 'custom-post-type-ui/custom-post-type-ui.php' => class stdClass { ... }, 'polylang/polylang.php' => class stdClass { ... }]; public $translations = []; public $no_update = ['akismet/akismet.php' => class stdClass { ... }, 'classic-editor/classic-editor.php' => class stdClass { ... }, 'insert-special-characters/insert-special-characters.php' => class stdClass { ... }, 'loco-translate/loco.php' => class stdClass { ... }, 'safe-redirect-manager/safe-redirect-manager.php' => class stdClass { ... }, 'safe-svg/safe-svg.php' => class stdClass { ... }, 'simple-page-ordering/simple-page-ordering.php' => class stdClass { ... }, 'classifai/classifai.php' => class stdClass { ... }]; public $checked = ['10up-sitemaps/10up-sitemaps.php' => '1.2', 'akismet/akismet.php' => '5.2', 'autoshare-for-twitter/autoshare-for-twitter.php' => '2.0.0', 'classic-editor/classic-editor.php' => '1.6.3', 'classifai/classifai.php' => '2.3.0-dev', 'custom-post-type-ui/custom-post-type-ui.php' => '1.13.5', 'distributor/distributor.php' => '2.0.0-rc1', 'auto-distribute/auto-distribute.php' => '0.2.0', 'distributor-edit-remote-post-meta/plugin.php' => '0.2.1', 'insert-special-characters/insert-special-characters.php' => '1.0.7', 'loco-translate/loco.php' => '2.6.4', 'mention-notifier/plugin.php' => '0.1.0', 'polylang/polylang.php' => '3.3.3', 'safe-redirect-manager/safe-redirect-manager.php' => '2.0.1', 'safe-svg/safe-svg.php' => '2.1.1', 'simple-page-ordering/simple-page-ordering.php' => '2.5.1', 'speedyseo/speedyseo.php' => '0.2.0'] }, $expiration = *uninitialized*) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/update.php:393
[08-Aug-2023 06:50:09 UTC] PHP 8. apply_filters($hook_name = 'pre_set_site_transient_update_plugins', $value = class stdClass { public $last_checked = 1691477409; public $response = ['autoshare-for-twitter/autoshare-for-twitter.php' => class stdClass { ... }, 'custom-post-type-ui/custom-post-type-ui.php' => class stdClass { ... }, 'polylang/polylang.php' => class stdClass { ... }]; public $translations = []; public $no_update = ['akismet/akismet.php' => class stdClass { ... }, 'classic-editor/classic-editor.php' => class stdClass { ... }, 'insert-special-characters/insert-special-characters.php' => class stdClass { ... }, 'loco-translate/loco.php' => class stdClass { ... }, 'safe-redirect-manager/safe-redirect-manager.php' => class stdClass { ... }, 'safe-svg/safe-svg.php' => class stdClass { ... }, 'simple-page-ordering/simple-page-ordering.php' => class stdClass { ... }, 'classifai/classifai.php' => class stdClass { ... }]; public $checked = ['10up-sitemaps/10up-sitemaps.php' => '1.2', 'akismet/akismet.php' => '5.2', 'autoshare-for-twitter/autoshare-for-twitter.php' => '2.0.0', 'classic-editor/classic-editor.php' => '1.6.3', 'classifai/classifai.php' => '2.3.0-dev', 'custom-post-type-ui/custom-post-type-ui.php' => '1.13.5', 'distributor/distributor.php' => '2.0.0-rc1', 'auto-distribute/auto-distribute.php' => '0.2.0', 'distributor-edit-remote-post-meta/plugin.php' => '0.2.1', 'insert-special-characters/insert-special-characters.php' => '1.0.7', 'loco-translate/loco.php' => '2.6.4', 'mention-notifier/plugin.php' => '0.1.0', 'polylang/polylang.php' => '3.3.3', 'safe-redirect-manager/safe-redirect-manager.php' => '2.0.1', 'safe-svg/safe-svg.php' => '2.1.1', 'simple-page-ordering/simple-page-ordering.php' => '2.5.1', 'speedyseo/speedyseo.php' => '0.2.0'] }, ...$args = variadic('update_plugins')) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/option.php:2053
[08-Aug-2023 06:50:09 UTC] PHP 9. WP_Hook->apply_filters($value = class stdClass { public $last_checked = 1691477409; public $response = ['autoshare-for-twitter/autoshare-for-twitter.php' => class stdClass { ... }, 'custom-post-type-ui/custom-post-type-ui.php' => class stdClass { ... }, 'polylang/polylang.php' => class stdClass { ... }]; public $translations = []; public $no_update = ['akismet/akismet.php' => class stdClass { ... }, 'classic-editor/classic-editor.php' => class stdClass { ... }, 'insert-special-characters/insert-special-characters.php' => class stdClass { ... }, 'loco-translate/loco.php' => class stdClass { ... }, 'safe-redirect-manager/safe-redirect-manager.php' => class stdClass { ... }, 'safe-svg/safe-svg.php' => class stdClass { ... }, 'simple-page-ordering/simple-page-ordering.php' => class stdClass { ... }, 'classifai/classifai.php' => class stdClass { ... }]; public $checked = ['10up-sitemaps/10up-sitemaps.php' => '1.2', 'akismet/akismet.php' => '5.2', 'autoshare-for-twitter/autoshare-for-twitter.php' => '2.0.0', 'classic-editor/classic-editor.php' => '1.6.3', 'classifai/classifai.php' => '2.3.0-dev', 'custom-post-type-ui/custom-post-type-ui.php' => '1.13.5', 'distributor/distributor.php' => '2.0.0-rc1', 'auto-distribute/auto-distribute.php' => '0.2.0', 'distributor-edit-remote-post-meta/plugin.php' => '0.2.1', 'insert-special-characters/insert-special-characters.php' => '1.0.7', 'loco-translate/loco.php' => '2.6.4', 'mention-notifier/plugin.php' => '0.1.0', 'polylang/polylang.php' => '3.3.3', 'safe-redirect-manager/safe-redirect-manager.php' => '2.0.1', 'safe-svg/safe-svg.php' => '2.1.1', 'simple-page-ordering/simple-page-ordering.php' => '2.5.1', 'speedyseo/speedyseo.php' => '0.2.0'] }, $args = [0 => class stdClass { public $last_checked = 1691477409; public $response = [...]; public $translations = [...]; public $no_update = [...]; public $checked = [...] }, 1 => 'update_plugins']) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/plugin.php:205
[08-Aug-2023 06:50:09 UTC] PHP 10. Classifai\Admin\Update->maybe_update($transient = class stdClass { public $last_checked = 1691477409; public $response = ['autoshare-for-twitter/autoshare-for-twitter.php' => class stdClass { ... }, 'custom-post-type-ui/custom-post-type-ui.php' => class stdClass { ... }, 'polylang/polylang.php' => class stdClass { ... }]; public $translations = []; public $no_update = ['akismet/akismet.php' => class stdClass { ... }, 'classic-editor/classic-editor.php' => class stdClass { ... }, 'insert-special-characters/insert-special-characters.php' => class stdClass { ... }, 'loco-translate/loco.php' => class stdClass { ... }, 'safe-redirect-manager/safe-redirect-manager.php' => class stdClass { ... }, 'safe-svg/safe-svg.php' => class stdClass { ... }, 'simple-page-ordering/simple-page-ordering.php' => class stdClass { ... }, 'classifai/classifai.php' => class stdClass { ... }]; public $checked = ['10up-sitemaps/10up-sitemaps.php' => '1.2', 'akismet/akismet.php' => '5.2', 'autoshare-for-twitter/autoshare-for-twitter.php' => '2.0.0', 'classic-editor/classic-editor.php' => '1.6.3', 'classifai/classifai.php' => '2.3.0-dev', 'custom-post-type-ui/custom-post-type-ui.php' => '1.13.5', 'distributor/distributor.php' => '2.0.0-rc1', 'auto-distribute/auto-distribute.php' => '0.2.0', 'distributor-edit-remote-post-meta/plugin.php' => '0.2.1', 'insert-special-characters/insert-special-characters.php' => '1.0.7', 'loco-translate/loco.php' => '2.6.4', 'mention-notifier/plugin.php' => '0.1.0', 'polylang/polylang.php' => '3.3.3', 'safe-redirect-manager/safe-redirect-manager.php' => '2.0.1', 'safe-svg/safe-svg.php' => '2.1.1', 'simple-page-ordering/simple-page-ordering.php' => '2.5.1', 'speedyseo/speedyseo.php' => '0.2.0'] }) /Users/ravinderkumar/Local-Sites/10osp/app/public/wp-includes/class-wp-hook.php:312
Step to reproduce
This issue only happens once when you switch from develop
to feature/update-plugin-checker
.
- Switch to
develop
- Go to the WordPress Updates page.
- Switch to
feature/update-plugin-checker
- Go to the WordPress Updates page.
- Check
debug.log
I was able to reproduce this but couldn't figure out why it's happening. I added a check to resolve this issue though would be great to understand what changed to cause this. As far as I can tell, everything still works as expected so this may not be a big deal. In addition, the method that was causing this error is the |
Description of the Change
The Plugin Update Checker library we use is also used on a few other 10up projects. We need to ensure we are using the same version across all of these or you can end up with conflicts (especially when using composer to manage all dependencies of a project). This PR updates this library to the latest version, which will also be done in other repos that are using this library.
How to test the Change
classifai.php
file, set the version number to something lower, like 2.1.0Check for updates
link; also ensure the plugin is active)View version X.X.X details
link and ensure you see proper detailsView version X.X.X details
link and ensure you see proper detailsupdate now
link and ensure an update works (either from the plugins page or the main updates page). Note though that this will wipe out your version controlledclassifai
directory, so proceed with cautionChangelog Entry
Credits
Props @dkotter
Checklist: