[wp-trac] [WordPress Trac] #64855: Connectors: AI provider plugins shown as "not installed" on sites with many plugins
WordPress Trac
noreply at wordpress.org
Thu Mar 12 21:12:06 UTC 2026
#64855: Connectors: AI provider plugins shown as "not installed" on sites with many
plugins
--------------------------+-----------------------------
Reporter: clifgriffin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: AI | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
== Description ==
The AI Connectors admin page (`options-connectors.php`) fails to detect
installed AI provider plugins when the site has more than ~10 plugins
installed and the AI provider plugins fall outside the first 10
alphabetically. Affected provider plugins (Anthropic, Google, OpenAI, or
any third-party connector plugin) show as "not installed" even though they
are installed and active.
This only affects sites where the alphabetically-sorted first 10 plugins
do not include the AI connector provider plugins. Sites with fewer than
~10 total installed plugins, or where the provider plugins happen to sort
into the first 10, are unaffected.
== Root Cause ==
In `routes/connectors-home/use-connector-plugin.ts`, the
`useConnectorPlugin` hook calls `getEntityRecords("root", "plugin")`
without specifying `per_page: -1`. Core-data's `getQueryParts()` defaults
`perPage` to `10` (`packages/core-data/src/queried-data/get-query-
parts.ts`), so the selector only returns the first 10 plugin records from
the store, even though the REST API response contains all installed
plugins.
On a site with many plugins, any connector provider plugin that sorts past
position 10 alphabetically will never be found by the `.find()` call:
{{{
const plugin = plugins.find(
(p) => p.plugin === `${pluginSlug}/plugin`
);
}}}
This causes `derivedPluginStatus` to be set to `"not-installed"` and the
UI shows an "Install" button for plugins that are already installed and
active.
== Steps to Reproduce ==
1. Install WordPress 7.0 beta 5
2. Have more than ~10 plugins installed (they don't need to be active —
just installed on disk so that the provider plugins sort past position 10
alphabetically)
3. Install and activate any AI provider plugin (e.g., `ai-provider-for-
google`, `ai-provider-for-anthropic`, or `ai-provider-for-openai`)
4. Navigate to Settings > Connectors (`options-connectors.php`)
5. Observe that the connector shows an "Install" button despite the
provider plugin being installed and active
== Expected Result ==
Connector should show as active/connected.
== Actual Result ==
Connector shows "Install" button. In the browser console,
`wp.data.select('core').getEntityRecords('root', 'plugin')` returns only
10 plugins instead of the full list.
== Proposed Fix ==
In the `useConnectorPlugin` hook, change:
{{{
const plugins = store2.getEntityRecords("root", "plugin");
}}}
to:
{{{
const plugins = store2.getEntityRecords("root", "plugin", { per_page: -1
});
}}}
This matches the pattern used elsewhere in core when fetching unpaginated
entity records.
== Notes ==
The plugins REST controller (`class-wp-rest-plugins-controller.php`)
already returns all plugins without pagination (it explicitly removes
`page`/`per_page` from collection params), so the REST API response is
correct — the issue is purely in the client-side selector pagination.
== Environment ==
WordPress 7.0 beta 5, tested with 238 installed plugins (1 active).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64855>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list