-
Notifications
You must be signed in to change notification settings - Fork 401
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
(minor) Plugin update count incorrect #64
Comments
I can't seem to reproduce that on my site. Are you sure it's not a configuration issue of some kind? Here are a few things to check:
|
Any news on this? |
I should have time to look further into this next week. |
Did you get a chance to look into the update count issue? |
I'm having this issue as well, but also my sample plugin continues to show an update is available. I'm not using a readme.txt file in the plugin folder, instead I'm only using the plugin-slug.json meta-data. The sample plugin updates correctly and the plugin updated message displays, but when I refresh the browser, I get that an update is available from this version to this same version. Any idea what the cause of this could be? |
That's normal for the example plugin. The 2.0 "update" that it downloads is actually just another copy of version 1.1, so it will keep saying that an update is available. It's deliberately set up that way to make it easier to test update notifications.
That should be fine. The readme.txt will be completely ignored when you're using a JSON file.
Install Debug Bar and look at the "PUC (your-plugin-slug)" panel in the "Debug" menu. Does everything look right in the "Configuration" and "Status" sections? What's the content of the "Checked version" and "Cached update" fields? |
Thanks for getting back @YahnisElsts |
I think I see the problem: the version number in the plugin header is "v1.0.2", but the version number in the JSON document is "1.0.2" (no "v" prefix). These numbers are not equal. Internally, the update checker uses the version_compare function to compare version numbers, and I suspect that this function will treat a version number that doesn't start with a digit as invalid. Solution: remove the "v" prefix from the |
Yup, that was it. Thanks very much @YahnisElsts |
All right, that's good to hear. Since the original reporter hasn't responded in 5+ months, I'll go ahead and assume they've got it fixed as well, and close the issue. |
It seems that this is causing the plugin update count on the menu items:
To show
1
in a red circle, despite all plugins being up to date.WP 4.5.3
Fresh install
The text was updated successfully, but these errors were encountered: