Title: Uncaught SyntaxErrors in generated JavaScript code
Last modified: July 22, 2017

---

# Uncaught SyntaxErrors in generated JavaScript code

 *  Resolved [wofo](https://wordpress.org/support/users/wofo/)
 * (@wofo)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/uncaught-syntaxerrors-in-generated-javascript-code/)
 * I have two issues with my WordPress website:
    1. The widget editor is unresponsive: it is impossible to edit widgets, drag and
       drop doesn’t work.
    2. The article/page editor is unresponsive: instead of the editor, I see just a
       html textarea. Furthermore, the font color is white, so I cannot see the text
       unless I select it.
 * After opening the widget editing view (wp-admin/widgets.php) with Chrome’s developer
   tools, I observed the following errors:
    1. Uncaught SyntaxError: Invalid or unexpected token (load-scripts.php)
    2. Uncaught SyntaxError: Invalid or unexpected token (wp-tinymce.php)
 * I have tried the following, yet nothing worked:
    1. Disabling and deleting all plugins
    2. Disabling and deleting all themes, except Twenty Seventeen
    3. Switching between PHP 7.1 and PHP 5.6
    4. Migrating the website from the server to my laptop in order to test locally
    5. Reinstalling WordPress from the admin panel
    6. Reinstalling WordPress manually
 * I don’t know what to do anymore. Any suggestions?
    -  This topic was modified 8 years, 8 months ago by [wofo](https://wordpress.org/support/users/wofo/).

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

 *  [hellheim](https://wordpress.org/support/users/hellheim/)
 * (@hellheim)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/uncaught-syntaxerrors-in-generated-javascript-code/#post-9342666)
 * Hi there,
 * Please delete your cookies and caches (all of them) then refresh the page. Should
   do the trick.
 * Thanks
 *  Thread Starter [wofo](https://wordpress.org/support/users/wofo/)
 * (@wofo)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/uncaught-syntaxerrors-in-generated-javascript-code/#post-9342750)
 * It seems difficult to believe, but that did the trick. Thanks!
 *  [hellheim](https://wordpress.org/support/users/hellheim/)
 * (@hellheim)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/uncaught-syntaxerrors-in-generated-javascript-code/#post-9342780)
 * Glad it worked for you.
 * Please mark topic as resolved.
    Thanks

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

The topic ‘Uncaught SyntaxErrors in generated JavaScript code’ is closed to new 
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [hellheim](https://wordpress.org/support/users/hellheim/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/uncaught-syntaxerrors-in-generated-javascript-code/#post-9342780)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
