[wp-trac] [WordPress Trac] #58648: Error: tinymce is not defined in post-new.php

WordPress Trac noreply at wordpress.org
Tue Jun 27 23:39:07 UTC 2023


#58648: Error: tinymce is not defined in post-new.php
--------------------------------------+--------------------------
 Reporter:  joemcgill                 |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.3
Component:  Script Loader             |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by joemcgill):

 Figured out what was happening here. `print_tinymce_scripts()` calls
 `wp_print_scripts()` to directly print the `tinymce` scripts without
 enqueueing them. When deciding which loading strategy to apply to a script
 in `WP_Scripts::get_eligible_loading_strategy()`, start with all possible
 strategies and then filter down to the one that should be applied in
 `WP_Scripts::filter_eligible_strategies()`. However, that method
 intentionally skips evaluating any handles that aren't enqueued to avoid
 situations where a script's eligible strategy would be affected by a
 dependent that was not enqueued.

 I've updated the PR so that before we start the filtering process, we
 first take into account the intended strategy of the handle when it is
 registered.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58648#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list