#57073 closed defect (bug) (fixed)
collapse menu not working on wp-admin/theme-editor.php or wp-admin/plugin-editor.php
Reported by: | itsnikhilpatel | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
when i'm on wp-admin/theme-editor.php or wp-admin/plugin-editor.php and click on collapse menu somehow how it's not working and if i after that if click on any other link it automatically go to collapse menu.
below here is screenshot
Attachments (1)
Change History (13)
This ticket was mentioned in PR #3630 on WordPress/wordpress-develop by @stalukder03.
2 years ago
#2
- Keywords has-patch added; needs-patch removed
@stalukder03 commented on PR #3630:
2 years ago
#4
Here pushed two commits where a commit (Updated jquery migrate to version 3.4.0) was related to this ticket, https://core.trac.wordpress.org/ticket/56743
#6
@
22 months ago
- Keywords needs-testing removed
Tested
On wp-admin/theme-editor.php and wp-admin/plugin-editor.php and the patch work without any issues.
#7
@
22 months ago
- Component changed from General to Administration
- Milestone changed from Awaiting Review to 6.2
- Version trunk deleted
Related: #56743.
Indeed, this tickets needs to wait for #56743 to be committed.
Then, this patch will fix the issue:
script-loader.php:
Replace
$scripts->add( 'wp-theme-plugin-editor', "/wp-admin/js/theme-plugin-editor$suffix.js", array( 'common', 'wp-util', 'wp-sanitize', 'jquery', 'jquery-ui-core', 'wp-a11y', 'underscore' ) );
with
$scripts->add( 'wp-theme-plugin-editor', "/wp-admin/js/theme-plugin-editor$suffix.js", array( 'common', 'wp-util', 'wp-sanitize', 'jquery', 'jquery-ui-core', 'wp-a11y', 'underscore' ), false, 1 );
#9
@
22 months ago
Hi @audrasjb
Fixed that dependency issue. PR updated. Now, this patch should work independently.
Please take a look.
Thanks
#10
@
21 months ago
Tested this issue with the PR https://github.com/WordPress/wordpress-develop/pull/3630 and this PR fixed the issue.
Test Report
Env
- WordPress - 6.2-alpha-20230215.230847
- Chrome Version - 110.0.5481.77 (Official Build) (x86_64)
- OS - macOS Monterey V12.3.1
- Theme: Twenty Twenty-One Version: 1.7
- PHP - 8.0.0
- Web Server - Apache
- Database - MySQL 5.7.28
- Used PR - https://github.com/WordPress/wordpress-develop/pull/3630
Steps to test
- Access the WordPress Dashboard.
- Navigate to the 'Appearance' section.
- Select the 'Theme File Editor' option.
- Click on the 'Collapse menu' feature.
Test result
The functionality of the 'Collapse menu' feature has been rectified, and it is now operating in accordance with the desired behavior. Upon being clicked, it is observed to expand or collapse the menu as intended. Comprehensive testing was conducted on this feature, along with the examination of other menu items and the 'Plugin File Editor' tab to ensure their smooth operation.
Screencast:
Before Fix -
https://screencast-o-matic.com/watch/c0noF1Vyj0Y
After Fix by PR3630 -
https://screencast-o-matic.com/watch/c0noFQVyj0W
Actual Results
✅ Expected result- works as expected with the patch.
@audrasjb commented on PR #3630:
21 months ago
#12
committed in https://core.trac.wordpress.org/changeset/55410 (without the jQuery Migrate related changes)
@itsnikhilpatel Thanks for ticket.
I've reviewed this issue and I replicate this issue in my local.
Ref: https://tinyurl.com/284ju5lf
It seems issue with the DOM object here - https://github.com/WordPress/wordpress-develop/blob/trunk/src/js/_enqueues/admin/common.js#L18
document.body return null