Making WordPress.org

Opened 4 weeks ago

Last modified 4 weeks ago

#7979 new defect (bug)

Plugins API: Fields filtering doesn't remove all fields.

Reported by: sirlouen's profile SirLouen Owned by:
Milestone: Priority: lowest
Component: Plugin Directory Keywords:
Cc:

Description (last modified by dd32)

This is a follow-up for #60783

Executing a query towards the Plugins Directory API http://api.wordpress.org/plugins/info/1.2/

Headers: User.Agent = "WordPress/6.9-alpha-60093-src; http://localhost:8889/"
Params:

{
	"action": "plugin_information",
	"request[slug]": "secupress",
	"request[fields][contributors]": "0",
	"request[fields][author]": "0",
	"request[fields][support_threads]": "0",
	"request[locale]": "en_US",
	"request[wp_version]": "6.9"
}

Despite explicitly asking to not include, resulting response is including:

  1. Author
  2. Support Threads

Also according to docs, some of those fields like:

  • author
  • author_profile
  • support_threads
  • support_threads_resolved
  • upgrade_notice
  • requires_plugin

Are not even being handled there, so it's impossible to decide to filter them out even manually.

Change History (1)

#1 @dd32
4 weeks ago

  • Description modified (diff)
  • Priority changed from normal to lowest
  • Summary changed from REST API: Fields filtering is not working as expect to Plugins API: Fields filtering doesn't remove all fields.

reformatted report for readability.

Realistically the remove fields functionality is included/supported for historical reasons, but is likely to be removed in a future API revision (or the client-specified list to be deprecated)

But correct, certain fields can't be removed from the output, that includes, but is not limited to, author, and support_threads. There's a whole bunch of others that likely aren't supported.

Note: See TracTickets for help on using tickets.