Title: Syntax Error (Different Browsers)
Last modified: August 21, 2016

---

# Syntax Error (Different Browsers)

 *  Resolved [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/)
 * Hello everyone!
 * I have lately experienced some problems with my online “WP Pizza” plugin. Every
   time I try to put an item in my cart or remove an item in my cart I get a Syntax
   Error. The errors are different given what browser I am using.
 * Safari:
    error : SyntaxError: JSON Parse error: Unrecognized token “
 * Chrome:
    Error : SyntaxError: Unexpected token
 * I have used this plugin for a few months now without any issues. Why all of a
   sudden is this not working? My site, if you wish to check and see the error codes
   yourself, is [http://www.tscsaginaw.com/](http://www.tscsaginaw.com/)
 * Thanks everyone for looking! Hope that there is a patch or a simple fix 🙂
 * [https://wordpress.org/plugins/wppizza/](https://wordpress.org/plugins/wppizza/)

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

 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910638)
 * this is actually not a browser issue …..(just that different browsers output 
   different text for the same issue)
 * can you tun on debug in wordpress and check the debug.log
 * i.e put this in your wp-config.php
 * define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’,
   false);
 * and then see(and tell me) what you get in your debog.log
 * thanks
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910644)
 * also.
    anything else that changed ? (i.e php version or some other plugin/theme
   updates ?)
 *  Thread Starter [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910662)
 * I did take off the header image on the top of the page. How would turn on my 
   debug log and put those in it. Sorry, I am kind of new at this.
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910681)
 * You will have yo edit your wp-config.php as I mentioned
    Which in turn will create
   a debug.log in your wp-content directory
 * Then try to add an item again to the cart and check what it says in that debug.
   log file
 *  Thread Starter [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910736)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910737)
 * Never, **ever**, post your database details on a public forum. You just gave 
   every hacker on the ‘net access to your database! Change your database password**
   now.**
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910738)
 * Listen to the man !!!!
 *  Thread Starter [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910741)
 * I refreshed the password
 *     ```
       /**
        * WordPress Localized Language, defaults to English.
        *
        * Change this to localize WordPress. A corresponding MO file for the chosen
        * language must be installed to wp-content/languages. For example, install
        * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
        * language support.
        */
       define('WPLANG', '');
   
       /**
        * For developers: WordPress debugging mode.
        *
        * Change this to true to enable the display of notices during development.
        * It is strongly recommended that plugin and theme developers use WP_DEBUG
        * in their development environments.
        */
       define('WP_DEBUG', true);
       define('WP_DEBUG_LOG', true);
       define('WP_DEBUG_DISPLAY', false);
       //define( 'WP_CACHE', true );
       require_once( dirname( __FILE__ ) . '/gd-config.php' );
       define( 'FS_METHOD', 'direct');
       define('FS_CHMOD_DIR', (0705 & ~ umask()));
       define('FS_CHMOD_FILE', (0604 & ~ umask()));
   
       /* That's all, stop editing! Happy blogging. */
   
       /** Absolute path to the WordPress directory. */
       if ( !defined('ABSPATH') )
       	define('ABSPATH', dirname(__FILE__) . '/');
   
       /** Sets up WordPress vars and included files. */
       require_once(ABSPATH . 'wp-settings.php');
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * Here, this is less revealing
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910742)
 * Sfter that-for starters-turn off your caching plug in which you seem to have,
   resd the faq regarding caching and see if that makes a difference
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910743)
 * And aldo disable the fs changemod stuff as this might well stop the debug.log
   from being created
 *  Thread Starter [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910749)
 * [13-May-2014 17:00:52 UTC] PHP Notice: Undefined offset: 1 in /home/content/p3nexnas03/
   32/2079632/html/wp-content/plugins/wppizza/templates/wppizza-loop.php on line
   255
 * FROM THE DEBUG!!! Woo!
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910755)
 * ok, we’re heading in the right direction
 * however, although I have no idea how you even managed to get that particular 
   error in the first place (unless there’s something really funny going on or some
   edits have taken place that would cause this) this has definitely nothing got
   to do with your syntax error.
 * send me the WHOLE debug.log (to dev[@]wp-pizza.com) to let me have a look….(zip
   it up please)
 * chances are that (probably/possibly) something else is throwing an error which
   in turn stops the ajax from executing/outputting things properly….
 * also – at least temporarily – disable all other plugins, see if it works then,
   and if it does , enable them one by one to find out which one is causing this
   issue.
 * if , with all other plugins disabled, it’s still throwing the error, send me 
   the debug.log too
 *  Thread Starter [nscharich](https://wordpress.org/support/users/nscharich/)
 * (@nscharich)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910759)
 * Resolved, GoogleXMLSitemaps broke it, the plugin. Thank you for all the quick
   responses
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910847)
 * ok.
 * although it’s a bit strange that googlexmlsitemap would break it ….
    i’ll have
   a look at that
 *  Plugin Author [ollybach](https://wordpress.org/support/users/ollybach/)
 * (@ollybach)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910848)
 * hmm,
 * i dont know actually which one you were using (as there are more than one google
   xml sitemap)
 * one of which even installs itself as “jpeg-upload-only” for some unknown reason
 * [http://wordpress.org/plugins/jpeg-upload-only/](http://wordpress.org/plugins/jpeg-upload-only/)
 * i guess i’ll just move on. glad you got it working regardless

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

The topic ‘Syntax Error (Different Browsers)’ is closed to new replies.

 * ![](https://ps.w.org/wppizza/assets/icon-256x256.png?rev=2498121)
 * [WPPizza - A Restaurant Plugin](https://wordpress.org/plugins/wppizza/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wppizza/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wppizza/)
 * [Active Topics](https://wordpress.org/support/plugin/wppizza/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wppizza/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wppizza/reviews/)

## Tags

 * [json parse error](https://wordpress.org/support/topic-tag/json-parse-error/)
 * [syntaxerror](https://wordpress.org/support/topic-tag/syntaxerror/)
 * [unexpected token](https://wordpress.org/support/topic-tag/unexpected-token/)

 * 15 replies
 * 3 participants
 * Last reply from: [ollybach](https://wordpress.org/support/users/ollybach/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/syntax-error-different-browsers/#post-4910848)
 * Status: resolved