Opened 6 years ago
Closed 5 years ago
#4468 closed defect (bug) (fixed)
Plugin Update Check API returns tested field without patch version
Reported by: | abrain | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
When plugins specify Tested up to:
in their readme.txt
, the Plugin Directory will append the current patch version number as there should be no breaking changes. This seems not to be reflected in the Plugin Update Check API, causing WordPress Core to show incorrect compatibility info.
For example the plugin Contact Form 7:
The readme.txt of the stable tag has set Tested up to: 5.2
Plugin Directory page shows Tested up to: 5.2.1
Plugins Info API 1.0 returns tested: 5.2.1
Plugins Info API 1.2 returns tested: 5.2.1
Result from the Update Check API (https://api.wordpress.org/plugins/update-check/1.1/
) (trimmed):
{ "plugins": { "contact-form-7/wp-contact-form-7.php": { "id": "w.org/plugins/contact-form-7", "slug": "contact-form-7", "plugin": "contact-form-7/wp-contact-form-7.php", "new_version": "5.1.3", "url": "https://wordpress.org/plugins/contact-form-7/", "package": "https://downloads.wordpress.org/plugin/contact-form-7.5.1.3.zip", "icons": { "2x": "https://ps.w.org/contact-form-7/assets/icon-256x256.png?rev=984007", "1x": "https://ps.w.org/contact-form-7/assets/icon-128x128.png?rev=984007" }, "banners": { "2x": "https://ps.w.org/contact-form-7/assets/banner-1544x500.png?rev=860901", "1x": "https://ps.w.org/contact-form-7/assets/banner-772x250.png?rev=880427" }, "banners_rtl": [], "tested": "5.2", "requires_php": false, "compatibility": [] } }, "translations": [], "no_update": {} }
Here, only 5.2
is returned for tested
. This causes the WordPress Core update screen to show Compatibility with WordPress 5.2.1: Unknown
.
Given that the respective check in Core hasn't been touched in 9 months, it seems that the Plugin Check API changed its behaviour.
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #meta by tellyworth. View the logs.
6 years ago
#2
@
6 years ago
- Component changed from API to Plugin Directory
- Owner set to dd32
- Status changed from new to accepted
This is caused by a few different things:
- Every hour the
tested
fields get updated if a new version becomes available. This needs to happen a little bit more often than hourly I think (or triggered by seeing$wp_version
change) - Every hour (and following a commit) the plugin data gets sync'd over to the source-data of the Update API, which attempts to clear the caches for the API endpoints. Unfortunately it only checks the
last_updated
field and the automatic increase of thetested
field doesn't trigger that.
I think the job that bumps the tested versions also needs to trigger the API tasks, which I'll take a look into
#3
@
6 years ago
Also just a note, I've refreshed the plugin update results for 5.2.1
- and it should be fixed by 5.2.2 happens.
Update Screen showing incorrect compatibility info