#59892 closed defect (bug) (fixed)
Deprecated print_emoji_styles produced during embed
Reported by: | bobbingwide | Owned by: | jorbin |
---|---|---|---|
Milestone: | 6.4.3 | Priority: | normal |
Severity: | normal | Version: | 6.4 |
Component: | Embeds | Keywords: | has-testing-info has-patch has-unit-tests fixed-major dev-reviewed |
Focuses: | Cc: |
Description
print_emoji_styles was deprecated in WordPress 6.4.0.
When WP_DEBUG is true in the target server, then the deprecated message can be issued during embed processing. This is returned to the browser and displayed in both the block editor and the front end.
Deprecated: Function print_emoji_styles is deprecated since version 6.4.0! Use wp_enqueue_emoji_styles instead. in wp-includes\functions.php on line 6031
Trace output from the server
\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php(186:2) bw_trace_deprecated_function_run(1) 37 1 2023-11-12T09:59:28+00:00 1.774142 0.000396 cf=embed_head,wp_print_styles,deprecated_function_run 21 2 50331648/50331648 256M F=512 3 Array
[0] => (string) "print_emoji_styles"
[1] => (string) "wp_enqueue_emoji_styles"
[2] => (string) "6.4.0"
- bw_lazy_backtrace \wp-content\plugins\oik-bwtrace\libs\bwtrace.php:108 0
- bw_backtrace \wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php:187 0
- bw_trace_deprecated_function_run(print_emoji_styles,wp_enqueue_emoji_styles,6.4.0) \wp-includes\class-wp-hook.php:324 3
- apply_filters(,array) \wp-includes\class-wp-hook.php:348 2
- do_action(array) \wp-includes\plugin.php:517 1
- do_action(deprecated_function_run,print_emoji_styles,wp_enqueue_emoji_styles,6.4.0) \wp-includes\functions.php:5456 4
- _deprecated_function(print_emoji_styles,6.4.0,wp_enqueue_emoji_styles) \wp-includes\deprecated.php:5905 3
- print_emoji_styles() \wp-includes\class-wp-hook.php:324 1
- apply_filters(,array) \wp-includes\class-wp-hook.php:348 2
- do_action(array) \wp-includes\plugin.php:517 1
- do_action(wp_print_styles) \wp-includes\functions.wp-styles.php:57 1
- wp_print_styles() \wp-includes\class-wp-hook.php:324 1
- apply_filters(array,array) \wp-includes\class-wp-hook.php:348 2
- do_action(array) \wp-includes\plugin.php:517 1
- do_action(embed_head) \wp-includes\theme-compat\header-embed.php:29 1
- require_once(\wp-includes\theme-compat\header-embed.php) \wp-includes\template.php:790 1
- load_template(/wp-includes/theme-compat/header-embed.php,1,array) \wp-includes\template.php:725 3
- locate_template(array,1,1,array) \wp-includes\general-template.php:48 4
- get_header(embed) \wp-includes\theme-compat\embed.php:13 1
- include(\wp-includes\theme-compat\embed.php) \wp-includes\template-loader.php:106 1
- require_once(\wp-includes\template-loader.php) \wp-blog-header.php:19 1
- require(\wp-blog-header.php) \index.php:17 1
Steps to reproduce
Using a fresh install
- Set WP_DEBUG to true in target server
- Add a post
- Embed the sample page eg https://example.com/sample-page/
- The Deprecated message will appear in the block editor.
- Save
- View post
- When the embedding is run the deprecated message appears in the front end.
Notes
- The workaround to set WP_DEBUG to false only works in the target server from which the content is being embedded.
- For screen captures see https://github.com/bobbingwide/bobbingwide/issues/112
Attachments (1)
Change History (18)
#1
@
11 months ago
Reproduction Report
This report validates that the issue can be reproduced.
Environment
- OS: macOS Sonoma 14.1.1
- Web Server: Nginx
- PHP: 7.4.30
- WordPress: 6.4.1
- Browser: Firefox 120.0
- Theme: Twenty Twenty-Four
- Active Plugins: None
Steps to Reproduce
- Open the Sample Page in the frontend.
- Copy its URL.
- Open or create a new post.
- In the content, add an Embed block.
- Paste the "Same Page" URL into the text field.
- Select the "Embed" button.
- 🐞 Bug occurs.
- Save or update the post.
- Refresh the page.
- Same 🐞 bug occurs.
- Check your server logs. The deprecation is listed.
Actual Results
- ✅ Error condition occurs (reproduced).
Supplemental Artifacts
#2
@
11 months ago
- Keywords has-testing-info added
- Milestone changed from Awaiting Review to 6.4.2
Hello @bobbingwide,
Welcome back to WordPress Core's Trac :) Thank you for sharing such detailed information. This kind of information is invaluable to help contributors investigate, find the root cause, and resolve it.
I am able to reproduce the issue.
Hmm, I wonder .. Why/how is the Embed block and the embed functionality triggering the print_emoji_styles()
? @bobbingwide provided a backtrace.
Next step is trace to find what and where is invoking print_emoji_styles()
in this scenario. From there, can determine if this needs to be fixed in Core or Gutenberg.
Moving it into 6.4.2 for further investigation.
#3
@
10 months ago
I'd have a second review of the changes implemented in https://github.com/WordPress/WordPress/commit/72f19abd94fa1860ebd4c69f1a887765b97a397d
and see whether or not the actions being invoked by embed are being run in the order expected by the solution that removes the hooks and adds them again.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
10 months ago
This ticket was mentioned in PR #5871 on WordPress/wordpress-develop by @peterwilsoncc.
9 months ago
#7
- Keywords has-patch has-unit-tests added
Initial push is just the tests.
#8
@
9 months ago
In the linked pull request:
- Add the
print_emoji_styles
back to the unit tests - Enqueue the emoji styles for embed templates.
The tests are passing now the functional commit has been pushed.
#9
@
9 months ago
- Owner set to jorbin
- Resolution set to fixed
- Status changed from new to closed
In 57306:
#10
@
9 months ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for consideration of [57306] to be backported to the 6.4 branch.
@peterwilsoncc commented on PR #5871:
9 months ago
#11
This ticket was mentioned in Slack in #core by jorbin. View the logs.
9 months ago
This ticket was mentioned in Slack in #core by jorbin. View the logs.
9 months ago
#15
@
9 months ago
- Keywords dev-reviewed added; dev-feedback removed
Tested this in the 6.4 branch before and after the PR. Deprecation is not displayed after the patch. Good to backport to the 6.4 branch.
#17
@
9 months ago
Deprecated print_emoji_styles produced during embed
Description
print_emoji_styles was deprecated in WordPress 6.4.0.
When WP_DEBUG is true in the target server, then the deprecated message can be issued during embed processing. This is returned to the browser and displayed in both the block editor and the front end.
Deprecated: Function print_emoji_styles is deprecated since version 6.4.0! Use wp_enqueue_emoji_styles instead. in wp-includes\functions.php on line 6031
Environment
- WordPress: 6.4.3-RC1
- PHP: 8.0.0
- Server: Apache/2.4.10 (Debian)
- Database: mysqli (Server: 5.5.59-MariaDB-1~wheezy / Client: 5.5.62)
- Browser: Chrome 121.0.0.0 (macOS)
- Theme: Twenty Twenty-Four 1.0
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.5.5
Steps to Reproduce
- Open the Sample Page in the frontend. Copy its URL.
- Open or create a new post.
- In the content, add an Embed block.
- Paste the "Same Page" URL into the text field.
- Select the "Embed" button.
🐞 Bug occurs.
- Save or update the post.
- Refresh the page. Same 🐞 bug occurs. Check your server logs. The deprecation is listed.
Expected Results
- ✅ Deprecation is not displayed after the patch
Actual Results
- https://ibb.co/H45TtNK ( WordPress 6.4.3 RC 1 )
Test Report: Can reproduce the reported issue.