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

WordPress Trac noreply at wordpress.org
Wed Nov 29 22:18:32 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             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  javascript
-------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:   => reporter-feedback
 * focuses:   => javascript


Old description:

> 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.

New description:

 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.

--

Comment:

 Thanks for the report.

 Are you able to deactivate all the plugins on your site to see if the
 problem persists? If so, can you try switching to one of the default
 themes (such as Twenty Seventeen) and see again if the problem persists?

 Failing that, are there any JavaScript errors showing in your web browser
 developer tools console?

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


More information about the wp-trac mailing list