Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: reorder_graphql_submenu_items() strips out other 3rd-party submenus. #214

Open
justlevine opened this issue Sep 30, 2024 · 0 comments
Assignees
Labels
type: bug Issue that causes incorrect or unexpected behavior

Comments

@justlevine
Copy link

Issue

When activating the plugin, other submenus registered to the graphql-ide menu get stripped out.

This is caused by WPGraphQLIDE\reorder_graphql_submenu_items

Expected Behavior

Other GraphQL submenu items should be preserved.

To test

  1. Register a custom submenu:

    add_action( 'admin_menu',
      static function() {
        add_submenu_page(
          'graphiql-ide'
          'SnapWP',
          'SnapWP',
          static function() => echo '<div>Hello World</div>',
          999
        );
      }
    );
  2. Confirm the menu item exists when WPGraphQL IDE is deactivated.
    image

  3. Activate WPGraphQL IDE and watch it disappear
    image

Additional notes.

This can be temporarily worked around by setting the admin_menu callback to a priority of > 100 so it runs after WPGraphQL IDE bugs out.

@jasonbahl jasonbahl self-assigned this Oct 16, 2024
@jasonbahl jasonbahl added the type: bug Issue that causes incorrect or unexpected behavior label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue that causes incorrect or unexpected behavior
Projects
None yet
Development

No branches or pull requests

3 participants