Title: Javascript error in admin panel/editor
Last modified: January 31, 2018

---

# Javascript error in admin panel/editor

 *  [severinen](https://wordpress.org/support/users/severinen/)
 * (@severinen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/)
 * Hello,
 * I have an error in my admin panel. The problem comes from the Theme Canape, Version:
   1.0.5 :
 * Uncaught TypeError: b(…).not(…).filter(…).mediaelementplayer is not a function
   
   at HTMLDocument.a (load-scripts.php:463) at j (jquery-latest.min.js:2) at Object.
   fireWith [as resolveWith] (jquery-latest.min.js:2) at Function.ready (jquery-
   latest.min.js:2) at HTMLDocument.J (jquery-latest.min.js:2)
 * “add media” buttons doesn’t work with this… I’ve disabled my plugin,
    replace
   all the folders (wp-admin, wp-include, etc…).
 * (By replacing the theme with “Twenty Seventeen”, I no longer have the problem,
   I can add photos again.)
 * An idea ?
 * Thank’s
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-error-in-admin-panel-editor-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9928914)
 * Which browser is this occurring in? I’ve loaded Canape 1.0.5 with WordPress 4.9.2
   on my test site and tried in Safari, Firefox, Firefox Developer Edition and Chrome
   and am not able to reproduce this issue issue. Have you tried in different browsers?
 *  Thread Starter [severinen](https://wordpress.org/support/users/severinen/)
 * (@severinen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9929604)
 * Chrome (last version, linux). My client tried on mozilla, same.
    (If you want,
   I can send my credential)
    -  This reply was modified 8 years, 3 months ago by [severinen](https://wordpress.org/support/users/severinen/).
 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9932734)
 * Given that I cannot reproduce this in Canape or a child theme of Canape, and 
   neither can two of our developers, I have a few suggestions/questions.
 * 1. It appears there may be some double enquequeing of js and jQuery going on.
   Have you added any enquequeing to the child theme functions.php file, or possibly
   did you directly insert it into the a header.php and footer.php files in the 
   child theme?
    2. Are you on the latest version of WordPress, 4.9.2? If not, can
   you please update? 3. Can you try disabling all plugins and see if the issue 
   still occurs? 4. Can you switch back to Canape parent instead of the child and
   see if the issue still occurs? (Try it with all plugins off also). 5. Go to Users
   > Your Profile and set the language back to English if you have it set to a different
   language and see if that fixes the issue.
 *  Thread Starter [severinen](https://wordpress.org/support/users/severinen/)
 * (@severinen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9937857)
 * Hello,
 * 1.no, this site was developed last summer, since the code has not been changed.
   
   2. WordPress 4.9.2–fr_FR. I did it again manually after the discovery of the 
   problem. 3. Same, I did it 4. Yes, the problem maybe come to childtheme (I investigate…)
 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9940671)
 * Let me know what happens when you go away from the Child Theme. Since I’ve not
   been able to reproduce this issue even with a child theme, I think the issue 
   may be in the Child. Not sure why it is coming up now and did not come up earlier
   unless there has been some sort of change in the WordPress core software that
   has now brought this to light.
 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9940677)
 * Also try #5. There was a bug a while ago that did this sort of error, but supposedly
   it was fixed.
 *  Thread Starter [severinen](https://wordpress.org/support/users/severinen/)
 * (@severinen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9941957)
 * Hello,
 * #5 solves nothing (French to English). I saw that it came from a function in 
   the functions.php by the last developer, I send it to you in case :
 *     ```
       function custom_admin_js() {
        $url = get_bloginfo('template_directory') . '..\..\..\themes\villa_bellamy\script_admin.js';
        echo '"<script src="http://code.jquery.com/jquery-latest.min.js"
        type="text/javascript"></script><script type="text/javascript" src="'. $url . '"></script>"';
       }
       add_action('admin_footer', 'custom_admin_js');
       ```
   
 * Thanks for your help 🙂
 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9944666)
 * Did you try switching away from the child theme and back to Canape? I can’t reproduce
   this on my test site and I’ve tried a number of things.
 *  Thread Starter [severinen](https://wordpress.org/support/users/severinen/)
 * (@severinen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9948469)
 * Yes, I tried.
 * This must come from the file that is called in the functions.php .
 * But the file is empty … Anyway, it works since I commented this function
 *  [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * (@sacredpath)
 * Automattic Happiness Engineer
 * [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9950172)
 * If you commented out this
 *     ```
       function custom_admin_js() {
        $url = get_bloginfo('template_directory') . '..\..\..\themes\villa_bellamy\script_admin.js';
        echo '"<script src="http://code.jquery.com/jquery-latest.min.js"
        type="text/javascript"></script><script type="text/javascript" src="'. $url . '"></script>"';
       }
       add_action('admin_footer', 'custom_admin_js');
       ```
   
 * Then the issue is with that particular javascript that is being loaded. This 
   leads me to believe that #1 I mentioned above on the double enqueue is what is
   causing the issue. It could be that something changed with WordPress in a recent
   release that caused this issue to all of a sudden pop up. If that Javascript 
   function is needed, then the original javascript called by the original theme
   would first need to be deenqueued before this one was called.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Javascript error in admin panel/editor’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/canape/1.0.6/screenshot.png)
 * Canape
 * [Support Threads](https://wordpress.org/support/theme/canape/)
 * [Active Topics](https://wordpress.org/support/theme/canape/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/canape/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/canape/reviews/)

## Tags

 * [admin-panel](https://wordpress.org/support/topic-tag/admin-panel/)
 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 10 replies
 * 2 participants
 * Last reply from: [sacredpath](https://wordpress.org/support/users/sacredpath/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-panel-editor-2/#post-9950172)
 * Status: not resolved