Title: Javascript JSON when block first added
Last modified: July 5, 2024

---

# Javascript JSON when block first added

 *  Resolved [Jack Whitworth](https://wordpress.org/support/users/benefaction/)
 * (@benefaction)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/javascript-json-when-block-first-added/)
 * When I add a block to the editor for the first time, I get a console error:
 *     ```wp-block-code
       Uncaught SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
       ```
   
 * This only happens when the block is added to the Gutenberg editor. If I save 
   the page and reload, then there are no further console errors, even if this block
   is on the page.
 * I noticed this because once I’d added this block while writing content, suddenly
   the saving button wouldn’t animate during a save as a product of the Javascript
   halting execution.
 * It’s worth noting that the plugin and the block itself are functioning perfectly,
   so this isn’t a major break.
 * This happens in both my local copy and the production copy of the website.
 * Server info:
 *     ```wp-block-code
       Server architecture	Linux 5.15.0-102-generic x86_64Web server	nginx/1.26.1PHP version	8.3.8 (Supports 64bit values)PHP SAPI	fpm-fcgiPHP max input variables	1000PHP time limit	120PHP memory limit	256MMax input time	60Upload max filesize	64MPHP post max size	64McURL version	7.81.0 OpenSSL/3.0.2Is SUHOSIN installed?	NoIs the Imagick library available?	YesAre pretty permalinks supported?	YesCurrent time	2024-07-05T13:25:13+00:00Current UTC time	Friday, 05-Jul-24 13:25:13 UTCCurrent Server time	2024-07-05T13:25:10+00:00
       ```
   
 * The only quirk with this WordPress installation is that /admin is used for the
   login page, but I don’t think that should have any affect on the JS being parsed.
 * If you need any extra information, please don’t hesitate to ask.

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

 *  Plugin Support [kamlesh08](https://wordpress.org/support/users/kamlesh08/)
 * (@kamlesh08)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/javascript-json-when-block-first-added/#post-17871586)
 * Hi [@benefaction](https://wordpress.org/support/users/benefaction/),
 * Thanks for your message and for flagging this issue.
 * I have investigated this further on my end and I was able to replicate it, so
   I have raised this issue on our product tracker so that the development team 
   can further investigate and work on a fix for this.
 * I don’t have an ETA on an update, as it will likely be rolled together with other
   improvements and refinements, so thanks for bearing with us in the meantime.
 * I hope this helps, and thanks for flagging the issue with us. Please do let me
   know if you require further assistance.
 * Thanks and Kind Regards,
 * Kamlesh.
 *  Thread Starter [Jack Whitworth](https://wordpress.org/support/users/benefaction/)
 * (@benefaction)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/javascript-json-when-block-first-added/#post-17878335)
 * No worries, thanks for taking a look and for queuing this up to get fixed.
 * I’ll mark this thread as resolved.

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

The topic ‘Javascript JSON when block first added’ is closed to new replies.

 * ![](https://ps.w.org/heroic-table-of-contents/assets/icon.svg?rev=2261757)
 * [Heroic Table of Contents](https://wordpress.org/plugins/heroic-table-of-contents/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/heroic-table-of-contents/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/heroic-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/heroic-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/heroic-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/heroic-table-of-contents/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jack Whitworth](https://wordpress.org/support/users/benefaction/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/javascript-json-when-block-first-added/#post-17878335)
 * Status: resolved