Opened 5 weeks ago
Last modified 9 days ago
#63399 new defect (bug)
Twenty Twenty-Five: editor style isn't enqueued
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.8.2 | Priority: | high |
Severity: | normal | Version: | 6.7 |
Component: | Bundled Theme | Keywords: | has-patch dev-feedback has-test-info |
Focuses: | Cc: |
Description
Twenty Twenty-Five has `add_editor_style` function to enqueue styles for the editor.
However, since the parameter get_parent_theme_file_uri( 'assets/css/editor-style.css' )
generates a URL, not a relative path to the stylesheet file, the editor style isn't enqueued.
The correct code should be:
add_editor_style( 'assets/css/editor-style.css' );
Attachments (1)
Change History (8)
#4
@
5 weeks ago
Testing Instructions
Steps to Reproduce
- Open a post.
- Apply a link to the text.
- 🐞 The underline style does not match that of the front end.
Expected Results
- ✅ The underline style matches that of the front end.
- ✅ Works in both the post editor and the site editor.
- ✅ I can override the CSS for the editor from my child theme by using twentytwentyfive_editor_style in my child theme.
#5
@
5 weeks ago
- Keywords dev-feedback has-test-info added; needs-testing removed
Test Report
Description
This report validates that the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/63399/63399.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.4.6
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.4.6)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
Supplemental Artifacts
Frontend underline
#6
@
5 weeks ago
- Milestone changed from Awaiting Review to 6.9
- Priority changed from normal to high
I did not experience the issue with my local (Windows) installation, but I found the error with a live site (nginx). The fifth style
tag printed in the body
of the post editor iframe gave a 401 Authorization Required
error instead of the editor styles.
With the patch, a child theme can override the stylesheet with anything when it uses the twentytwentyfive_editor_style()
function. The patch also adds the ability to override the editor styles by uploading another stylesheet at assets/css/editor-style.css
within the child theme.
I would like to get some testing on this specifically because older themes we have historically left with editor styles.