Title: Uncaught Syntax Error and Uncaught Reference Error: wp not defined
Last modified: August 17, 2020

---

# Uncaught Syntax Error and Uncaught Reference Error: wp not defined

 *  [Philipp](https://wordpress.org/support/users/morpheus200k/)
 * (@morpheus200k)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-syntax-error-and-uncaught-reference-error-wp-not-defined/)
 * Hello guys,
 * I can’t find a clue for that. I’ve been receiving these errors in all my browsers
   since some days and it seems to ground in wp super cache plugin.
 * The 1st error says, that there is a missing ) after argument list – the line 
   is 165 of the index.html created by WP supercache. Code is here:
 * `var qodeGlobalVars = {"vars":{"qodeAddingToCartLabel":"Adding to Cart...","page_scroll_amount_for_sticky":""}};
   </script> <script type='text/javascript' id='qode-like-js-extra'>var qodeLike
   = {"ajaxurl":"https:\/\/b-ceed.de\/wp-admin\/admin-ajax.php"};</script> <script
   type='text/javascript' id='ewd-ufaq-js-js-extra'>var ewd_ufaq_php_data = {"retrieving_results":"
   Retrieving Results...","highlight_search_term":"No"};</script> <script type='
   text/javascript' async='async' src='https://b-ceed.de/wp-includes/js/dist/vendor/
   wp-polyfill.min.js' id='wp-polyfill-js'></script> <script type='text/javascript'
   id='wp-polyfill-js-after'>( 'fetch' in window ) || document.write( '<script async
   ='async' src="https://b-ceed.de/wp-includes/js/dist/vendor/wp-polyfill-fetch.
   min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '
   <script async='async' src="https://b-ceed.de/wp-includes/js/dist/vendor/wp-polyfill-
   node-contains.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.DOMRect ) || document.
   write( '<script async='async' src="https://b-ceed.de/wp-includes/js/dist/vendor/
   wp-polyfill-dom-rect.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.URL && window.
   URL.prototype && window.URLSearchParams ) || document.write( '<script async='
   async' src="https://b-ceed.de/wp-includes/js/dist/vendor/wp-polyfill-url.min.
   js?ver=3.6.4"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.
   keys ) || document.write( '<script async='async' src="https://b-ceed.de/wp-includes/
   js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.
   prototype.matches && Element.prototype.closest ) || document.write( '<script 
   async='async' src="https://b-ceed.de/wp-includes/js/dist/vendor/wp-polyfill-element-
   closest.min.js?ver=2.0.2"></scr' + 'ipt>' );</script> <script type='text/javascript'
   async='async' src='https://b-ceed.de/wp-includes/js/dist/dom-ready.min.js' id
   ='wp-dom-ready-js'></script> <script type='text/javascript' async='async' src
   ='https://b-ceed.de/wp-includes/js/dist/i18n.min.js' id='wp-i18n-js'></script
   > <script type='text/javascript' id='wp-a11y-js-translations'>( function( domain,
   translations ) {`
 * This error occurs on all my pages cached by wp supercache.
 * The second and third errors occur with the text “Uncaught ReferenceError: wp 
   is not defined at index:168 and index:169
 * Code:
 *     ```
       	wp.i18n.setLocaleData( localeData, domain );
       } )( "default", {"translation-revision-date":"2020-08-12 12:09:48+0000","generator":"GlotPress\/3.0.0-alpha.2","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Notifications":["Benachrichtigungen"]}},"comment":{"reference":"wp-includes\/js\/dist\/a11y.js"}} );</script> <script type='text/javascript' async='async' src='https://b-ceed.de/wp-includes/js/dist/a11y.min.js' id='wp-a11y-js'></script> <script type='text/javascript' id='jquery-ui-autocomplete-js-extra'>var uiAutocompleteL10n = {"noResults":"Es wurden keine Ergebnisse gefunden, die deinen Suchkriterien entsprechen.","oneResult":"1 Ergebnis gefunden. Benutze die Pfeiltasten zum Navigieren.","manyResults":"%d Ergebnisse gefunden. Benutze die Pfeiltasten zum Navigieren.","itemSelected":"Eintrag ausgew\u00e4hlt."};</script> <script>window.FWP_JSON = {"prefix":"fwp_","no_results_text":"No results found","ajaxurl":"https:\/\/b-ceed.de\/wp-json\/facetwp\/v1\/refresh","nonce":"ee1f7a4091","preload_data":{"facets":{"ba_kategorie":"<select class=\"facetwp-dropdown\"><option value=\"\">Kategorie: alle<\/option><option value=\"b-bestseller\">Aktuell saisonal (22)<\/option><option value=\"direktbuchung\">Direktbuchung (7)<\/option><option value=\"b-kennenlernen\">Eisbrecher (27)<\/option><option value=\"b-sommer\">Fr\u00fchling bis Sommerfest (31)<\/option><option value=\"b-genuss\">Gaumenfreude (11)<\/option><option value=\"b-winter\">Herbst bis Winter (24)<\/option><option value=\"b-kreativ\">Kreativit\u00e4t (8)<\/option><option value=\"b-mystery\">Mystery (7)<\/option><option value=\"b-nervenkitzel\">Nervenkitzel (18)<\/option><option value=\"b-sport\">Sport und Spiel (27)<\/option><option value=\"b-zerstreuung\">Zerstreuung (30)<\/option><\/select>","firmenreisen_eigenschaft":"<select class=\"facetwp-dropdown\"><option value=\"\">Filtern nach: alle<\/option><option value=\"1\">Aktuell (20)<\/option><option value=\"3\">Beliebt (8)<\/option><option value=\"2\">Deal (7)<\/option><option value=\"neu\">Neu (1)<\/option><\/select>","suche":"<span class=\"facetwp-input-wrap\"><i class=\"facetwp-icon\"><\/i><input type=\"text\" class=\"facetwp-search\" value=\"\" placeholder=\"Stichwortsuche ...\" \/><\/span>"},"template":"","settings":{"pager":{"page":1,"per_page":64,"total_rows":36,"total_pages":1},"num_choices":{"ba_kategorie":11,"firmenreisen_eigenschaft":4},"labels":{"ba_kategorie":"ba_kategorie","firmenreisen_eigenschaft":"Firmenreisen-Eigenschaft","suche":"suche"},"suche":{"auto_refresh":"no"}}}};
       ```
   
 * Can anyone help me out with that?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-syntax-error-and-uncaught-reference-error-wp-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-syntax-error-and-uncaught-reference-error-wp-not-defined/#post-13276363)
 * Can you see anything different between cached pages and non-cached pages? Download
   each and compare – I use vimdiff for comparing text files but there all sorts
   of ways of comparing.

Viewing 1 replies (of 1 total)

The topic ‘Uncaught Syntax Error and Uncaught Reference Error: wp not defined’ is
closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

## Tags

 * [Uncaught ReferenceError](https://wordpress.org/support/topic-tag/uncaught-referenceerror/)

 * 1 reply
 * 2 participants
 * Last reply from: [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/uncaught-syntax-error-and-uncaught-reference-error-wp-not-defined/#post-13276363)
 * Status: not resolved