Skip to content

Fix: Only auto register settings if the plugin the connector references is installed and active.#77273

Open
jorgefilipecosta wants to merge 1 commit intotrunkfrom
codex/connectors-auto-registration-gate
Open

Fix: Only auto register settings if the plugin the connector references is installed and active.#77273
jorgefilipecosta wants to merge 1 commit intotrunkfrom
codex/connectors-auto-registration-gate

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta commented Apr 13, 2026

Summary

  • keep connector setting auto-registration unchanged for AI providers
  • only auto-register non-AI connector settings when plugin.is_active exists, is callable, and returns true
  • add focused PHPUnit coverage for the AI and non-AI registration paths
  • The current behavior is wrong if plugin A registers a connector for plugin B we were having a bug where its settings were registered and exposed in REST even if plugin B was not installed and activated. This fixes the issue.

Testing

  • Verify the connectors page works as before.
  • Verify the unit tests pass.

@github-actions
Copy link
Copy Markdown

Flaky tests detected in 933f28b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24355536206
📝 Reported issues:

@jorgefilipecosta jorgefilipecosta changed the title Connectors: Gate non-AI default setting auto-registration Fix: Only auto register settings if the plugin the connector references is installed and active. Apr 19, 2026
@jorgefilipecosta jorgefilipecosta marked this pull request as ready for review April 19, 2026 11:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jorgefilipecosta jorgefilipecosta added No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Type] Bug An existing feature does not function as intended labels Apr 19, 2026
@github-project-automation github-project-automation Bot moved this to 🔎 Needs Review in WordPress 7.0 Editor Tasks Apr 25, 2026
@t-hamano
Copy link
Copy Markdown
Contributor

Can we create a core ticket and a core PR to move this PR forward?

@jorgefilipecosta
Copy link
Copy Markdown
Member Author

Can we create a core ticket and a core PR to move this PR forward?

It was already done WordPress/wordpress-develop#11564, https://core.trac.wordpress.org/ticket/65099 as soon as WordPress/wordpress-develop#11565 is committed these ones will also go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Bug An existing feature does not function as intended

Projects

Status: 🔎 Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants