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

Fatal error when $submenu is NULL for cetain user roles #39423

Closed
ecairol opened this issue Sep 17, 2024 · 4 comments · Fixed by #39424
Closed

Fatal error when $submenu is NULL for cetain user roles #39423

ecairol opened this issue Sep 17, 2024 · 4 comments · Fixed by #39424
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". Groundskeeping Worked on by Dotcom Groundskeeping [Platform] Atomic [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@ecairol
Copy link
Contributor

ecairol commented Sep 17, 2024

Impacted plugin

Jetpack, CRM
Initially reported for a CRM user, but this seems to happen for other sites without Jetpack CRM.

It could be related to users using SSO but needs more debugging.

Quick summary

This error is happening for users with the role zerobs_admin (aka as Jetpack CRM Admin (Full CRM Permissions)), but I suspect it could happen to other custom user roles as well.

The error

PHP Fatal error: Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, null given in /wordpress/plugins/jetpack/13.9-a.3/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-atomic-admin-menu.php:333
Stack trace:
#0 /wordpress/plugins/jetpack/13.9-a.3/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-atomic-admin-menu.php(333): array_column(NULL, 3)
#1 /wordpress/plugins/jetpack/13.9-a.3/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-admin-menu.php(40): Automattic\Jetpack\Masterbar\Atomic_Admin_Menu->add_jetpack_menu()
#2 /wordpress/plugins/jetpack/13.9-a.3/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-atomic-admin-menu.php(76): Automattic\Jetpack\Masterbar\Admin_Menu->reregister_menu_items()
#3 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Masterbar\Atomic_Admin_Menu->reregister_menu_items('')
#4 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /wordpress/core/6.6.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /wordpress/core/6.6.2/wp-admin/includes/menu.php(161): do_action('admin_menu', '')
#7 /wordpress/core/6.6.2/wp-admin/menu.php(412): require_once('/wordpress/core...')
#8 /wordpress/core/6.6.2/wp-admin/admin.php(158): require('/wordpress/core...')
#9 /wordpress/core/6.6.2/wp-admin/index.php(10): require_once('/wordpress/core...')
#10 {main}
thrown in /wordpress/plugins/jetpack/13.9-a.3/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-atomic-admin-menu.php on line 333

This is happening for all Jetpack CRM Admin users that login via SSO.

The bug was added back in March, when adding the Scan option to the Jetpack submenu:

Potential fix
Here's a potential fix to the problem: Pull Request #39424

Steps to reproduce

Team 51 can provide you access to the error logs on one of our partner's sites.

  1. Login to the site as an Admin
  2. Create a user with the role Jetpack CRM Admin
  3. On another browser, try to login with this new user using SSO
  4. The new user is unable to login, and sees: There has been a critical error on this website. Please check your site admin email inbox for instructions.

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

Some (< 50%)

Available workarounds?

No and the platform is unusable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

Atomic

Logs or notes

No response

@ecairol ecairol added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged labels Sep 17, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Platform] Atomic [Pri] BLOCKER labels Sep 17, 2024
@jartes
Copy link

jartes commented Sep 18, 2024

📌 ACTIONS

  • Triaged
  • Lowered priority from Blocker to High.

📌 Message to Author
Thanks for reporting and proposing a PR for this one @ecairol!

@jartes jartes added [Pri] High Triaged and removed [Pri] BLOCKER Needs triage Ticket needs to be triaged labels Sep 18, 2024
@jartes jartes moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Sep 18, 2024
@mgozdis
Copy link

mgozdis commented Sep 23, 2024

User report: 8764375-zd-a8c

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8764375-zen
  • 8774878-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Sep 23, 2024
@mgozdis
Copy link

mgozdis commented Sep 23, 2024

Another user report: 8774878-zd-a8c

@mmtr mmtr moved this from Triaged to In Progress in Automattic Prioritization: The One Board ™ Oct 1, 2024
@mmtr mmtr added the Groundskeeping Worked on by Dotcom Groundskeeping label Oct 1, 2024
@matticbot matticbot moved this from In Progress to Triaged in Automattic Prioritization: The One Board ™ Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". Groundskeeping Worked on by Dotcom Groundskeeping [Platform] Atomic [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack Triaged [Type] Bug When a feature is broken and / or not performing as intended
Development

Successfully merging a pull request may close this issue.

4 participants