Title: Javascript error in product edit page
Last modified: October 12, 2018

---

# Javascript error in product edit page

 *  Resolved [Ege Sertçetin](https://wordpress.org/support/users/egesu/)
 * (@egesu)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-in-product-edit-page/)
 * Thanks for the plugin, I really needed it!
 * I added it to my fresh wordpress installation with a custom theme. After I activated
   the plugin, I added theee product urls. When the product edit page reloaded after
   saving, I started getting JSON parse error:
 * `SyntaxError: JSON.parse: unterminated string at line 1 column 47 of the JSON
   data`

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

 *  Thread Starter [Ege Sertçetin](https://wordpress.org/support/users/egesu/)
 * (@egesu)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-in-product-edit-page/#post-10776248)
 * I found the problem and solution:
 * I used single quotes in my button text. In `admin/class-mepu-woo-additional-fields.
   php` line 80, the object is encoded without converting single quotes which breaks
   the HTML. So `JSON_HEX_APOS` constant should be passed to `json_encode` function
   as second parameter.
    -  This reply was modified 7 years, 8 months ago by [Ege Sertçetin](https://wordpress.org/support/users/egesu/).
 *  Plugin Author [Pawel Cmachowski](https://wordpress.org/support/users/cmachu/)
 * (@cmachu)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-product-edit-page/#post-11267973)
 * Hello,
 * Thank you for notice and solution.
    I will update the plugin with your fix on
   version 1.1.0.
 * Best,
    Paul

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

The topic ‘Javascript error in product edit page’ is closed to new replies.

 * ![](https://ps.w.org/multiple-external-product-urls-for-woocommerce/assets/icon-
   256x256.png?rev=1933591)
 * [Multiple external product URLs for WooCommerce](https://wordpress.org/plugins/multiple-external-product-urls-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-external-product-urls-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-external-product-urls-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-external-product-urls-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-external-product-urls-for-woocommerce/reviews/)

## Tags

 * [javascript error](https://wordpress.org/support/topic-tag/javascript-error/)
 * [JSON error](https://wordpress.org/support/topic-tag/json-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pawel Cmachowski](https://wordpress.org/support/users/cmachu/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-product-edit-page/#post-11267973)
 * Status: resolved