Opened 3 months ago
Closed 3 months ago
#64125 closed defect (bug) (fixed)
Command Palate: Don't include palate on Network Admin
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | Editor | Keywords: | has-patch commit |
| Focuses: | Cc: |
Change History (14)
#2
@
3 months ago
Just the network admin: /wp-admin/network/
I think an is_network_admin check and early return inside wp_enqueue_command_palette_assets would work.
This ticket was mentioned in PR #10377 on WordPress/wordpress-develop by @wildworks.
3 months ago
#3
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/64125
In the network admin screen, commands primarily intended for site editors don't work, such as Go to : Styles and Go to: Templates.
These commands are registered in JS, namely Gutenberg. Ideally, we'd need to detect network admin status client-side and disable comments. As a temporary fix, disable the command palette itself in the network admin area to avoid 404 errors.
### Testing Instructions
- Define
LOCAL_MULTISITE=truein the.envfile - Run:
npm run env:start,npm run env:install, andnpm run dev - Access to
http://localhost:8889/wp-admin/network/ - Try to launch the Comand Palette and confirm that nothing happens
#4
@
3 months ago
Gutenberg issue for aiming for the ideal solution: https://github.com/WordPress/gutenberg/issues/72527
@wildworks commented on PR #10377:
3 months ago
#5
This issue may be better resolved on the client side rather than the server side, so I'm closing this PR for now. See: https://github.com/WordPress/gutenberg/pull/72572
This ticket was mentioned in Slack in #core by amykamala. View the logs.
3 months ago
#7
@
3 months ago
- Resolution set to fixed
- Status changed from new to closed
This issue has been fixed on the client side: https://github.com/WordPress/gutenberg/pull/72572
This problem should be resolved in the Beta 2 release.
This ticket was mentioned in PR #10422 on WordPress/wordpress-develop by @wildworks.
3 months ago
#8
#9
@
3 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
This issue has been fixed on the client side: https://github.com/WordPress/gutenberg/pull/72572
This problem should be resolved in the Beta 2 release.
The client-side approach was not ideal. I decided to check whether the current screen is Network Admin on the server side and conditionally enable commands based on that result.
- Gutenberg PR: https://github.com/WordPress/gutenberg/pull/72698
- Core Patch: https://github.com/WordPress/wordpress-develop/pull/10422
This ticket was mentioned in Slack in #core-committers by wildworks. View the logs.
3 months ago
#11
@
3 months ago
- Keywords commit added
- Owner set to wildworks
- Status changed from reopened to assigned
#12
@
3 months ago
I'd like to commit PR 10422 before Beta3, but could you review the commit message?
Command Palette: Add network admin check To prevent the registration of commands that would cause a 404 error in the network administration screen, pass the result of the `is_network_admin` check to the command palette initialization function. Follow-up to [27195], [41062]. Props jorbin, ntsekouras, soean, tobiasbg Fixes #64125.
I included soean and tobiasbg in the props because they pointed out the problem here: https://github.com/WordPress/gutenberg/pull/72572#issuecomment-3442252889
Thanks for reporting. Does this ticket mean that in multisite, the command palette should be removed from all screens, or is it just meant to be disabled on the dashboard?