[wp-trac] [WordPress Trac] #42750: Javascript breaks in some backend pages

WordPress Trac noreply at wordpress.org
Wed Nov 29 21:01:30 UTC 2017


#42750: Javascript breaks in some backend pages
--------------------------+-----------------------------
 Reporter:  viajarapie    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 As discussed in ticket #42574, there seems to be at least one further
 reason why javascript stops working on some backend pages other than the
 already identified and corrected about the language codes.

 Please refer to entry #24 in said ticket #42574 where the problem is
 described by some other user. According to this description javascript
 stops working when jquery is loaded twice. I don't know javascript at all
 and I can't identify where jquery is loaded from but I checked the source
 for different pages on my backend with consistent results: every time a
 backend page doesn't work well (like sreen options or help menus not being
 deployed, post tags not being assignable and other malfunctions), I see
 jquery being loaded twice in the page source. Every time a backend page
 shows no problems, there's only one load of jquery in the page source. The
 correlation seems clear.

 I enclose source excerpts from two different pages, Post Editor and Image
 Editor where the double loading of jquery is shown. I think it's the very
 same source for both cases.

 In pages that work well there's only this jquery loading:

                 <script type="text/javascript">
                         jQuery(document).ready(function($){
                                 $('select[name^="action"] option:last-
 child').before('<option value="bulk_regenerate_thumbnails">Regenerate
 Thumbnails</option>');
                         });
                 </script>

 Hope you can help and thanks in advance.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42750>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list