Skip to content

Connectors: plugin.file does not account for mu-plugins. #76984

@peterwilsoncc

Description

@peterwilsoncc

Description

The connectors screen uses plugin.file to determine whether a Core connector should be displayed for an installed but inactive plugin. For plugins installed as mu-plugins, this can result in the connector not being displayed when the plugin is in use.

Connector registration should account for plugins activated via mu-plugins.

Follow up to #76909.

Step-by-step reproduction instructions

Note

I've created a PR to remove the Akismet connector for both the GB and wp-dev repos. If these have been merged you will need to use the commits below

  1. Install WordPress trunk, I used WordPress/WordPress@67fe063
  2. Install, build and activate Gutenberg. I used 309dfc2
  3. Ensure the Akismet plugin is installed in the plugins directory but not activated
  4. Visit Settings > Connectors
  5. Observe Akismet is shown as an option
  6. Move the plugins/akismet folder to mu-plugins/akismet
  7. Add the one line file mu-plugins/a.php with the content require_once __DIR__ . '/akismet/akismet.php';
  8. Reload Settings > Connectors
  9. Observe that the Akismet option is not displayed, despite the plugin being active.

Screenshots, screen recording, code snippet

Installed as mu-plugin

Image

Environment info

  • WordPress: 7.1-alpha-62193
  • PHP: 8.3.30
  • Server: nginx/1.24.0
  • Database: mysqli (Server: 8.0.44-0ubuntu0.24.04.2 / Client: mysqlnd 8.3.30)
  • Browser: Firefox 149.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins:
  • Plugins:
    • Gutenberg 22.9.0-rc.1
    • Query Monitor 3.20.2
    • Test Reports 1.2.1

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

Connectors screenTracks connectors screen related tasks[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions