[wp-trac] [WordPress Trac] #61525: Plugins page keeps making HTTP requests for plugin dependencies which are not in the WordPress Plugin Directory
WordPress Trac
noreply at wordpress.org
Tue Sep 3 22:48:07 UTC 2024
#61525: Plugins page keeps making HTTP requests for plugin dependencies which are
not in the WordPress Plugin Directory
--------------------------+---------------------
Reporter: siliconforks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Plugins | Version: 6.5
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by afragen):
Actually this shouldn't be handled by the existing transient as the
example used by the OP is `__doing_it_wrong`. The transient was designed
to store data from a successful call to the Plugins API.
Clearly when testing, by using a plugin slug that doesn't exist or doesn't
yet exist, the expectation is that no useful data will be returned and the
dependency will not be met. As the data returned isn't useful it's not
stored. It's possible that the slug was simply entered with a typo or the
Plugins API returned an error due to any number of potential
`wp_remote_get()` related issues. When Plugins API issue resolves, that
data will be properly stored. If we would have stored the initial
incorrect data it might be 12 hours until actual data is available and the
user might infer that something is broken.
If the slug is for a premium plugin or a plugin that simply isn't
available in the Plugin Repository, we have written the
[https://github.com/afragen/advanced-plugin-dependencies Advanced Plugin
Dependencies] plugin to solve that issue. Before anyone asks, this plugin
was not allowed in the Plugin Repository for fear some developer might
misuse it. Nothing in the plugin is at issue only how it might be used.
The solution is to enter a proper slug as a dependency for a plugin in the
Plugin Repository, or use the Advanced Plugin Dependencies plugin with
data for a plugin not in the Plugin Repository.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61525#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list