Title: JSON parse error when editing rule
Last modified: March 21, 2024

---

# JSON parse error when editing rule

 *  Resolved [Springtide](https://wordpress.org/support/users/reneyoung/)
 * (@reneyoung)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/)
 * When I try to give an existing rule a name or make any other edits to it, I get
   a red box with “JSON.parse: unexpected character at line 1 column 1 of the JSON
   data”. My changes cannot be saved. Any ideas?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjson-parse-error-when-editing-rule%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17519502)
 * Hi [@reneyoung](https://wordpress.org/support/users/reneyoung/),
 * Sorry to hear you encountered an issue.
 * We’re unable to reproduce this. Have you tried checking for plugin/theme conflict?
 * You can also send us an error log over at [Contact – Code Atlantic](https://code-atlantic.com/contact/)
   so we can take a closer look.
 * Feel free to add more details regarding the issue including screenshots and steps
   to reproduce the issue.
 * We’ll wait for your response! 🙏
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17519515)
 * [@reneyoung](https://wordpress.org/support/users/reneyoung/) – Also helpful to
   send us info on whether this was a fresh install or just updated and trying to
   edit old restrictions etc.
 *  Thread Starter [Springtide](https://wordpress.org/support/users/reneyoung/)
 * (@reneyoung)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17521366)
 * I checked the content control log contents and there are no entries since October
   2023. I only have one restriction on the website, and when I try to change the
   protection from Login & back to Custom URL, after entering the URL and clicking
   Save Restriction, I get the JSON error.
 * ![](https://i0.wp.com/www.towcanada.ca/wp-content/uploads/2024/03/Screenshot-
   2024-03-22-at-9.36.08-AM.webp?ssl=1)
 *  Thread Starter [Springtide](https://wordpress.org/support/users/reneyoung/)
 * (@reneyoung)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17521373)
 * This was not a fresh install. I am trying to edit a restriction that has been
   up for at least a year. The restriction works, but I want users to be redirected
   to our custom login form rather than the default WordPress login form. To do 
   that, I need to enter the custom URL of the page containing the custom login 
   form. But content control won’t let me save the restriction.
 * Maybe I should try creating a new restriction and deleting the current one. I
   thought maybe the JSON error itself would provide a clue because it refers to“
   line 1, column 1”. I have no idea what JSON is or where it is found.
    -  This reply was modified 2 years, 2 months ago by [Springtide](https://wordpress.org/support/users/reneyoung/).
    -  This reply was modified 2 years, 2 months ago by [Springtide](https://wordpress.org/support/users/reneyoung/).
 *  Plugin Support [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17524733)
 * Hi [@reneyoung](https://wordpress.org/support/users/reneyoung/),
 * Thanks for the response! Could you try recreating the rule and let us know if
   the error is still there?
 * You can disable the old rule temporarily when testing the new rule you created.
 * Let us know how it goes. 🙏
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17536478)
 * [@reneyoung](https://wordpress.org/support/users/reneyoung/) – you can also try
   exporting it and reimporting it. Might get the kinks out of whatever data is 
   missing or malformed.
 * Check it in the list, the bulk actions includes an export option. Then there 
   is an option to import when no items are checked.
 *  Thread Starter [Springtide](https://wordpress.org/support/users/reneyoung/)
 * (@reneyoung)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17536629)
 * I deleted the restriction, then added it back. I am no longer getting the JSON
   error, but the restriction isn’t working at all. Logged out users can access 
   the restricted page. The protected content is a page:
 * [https://www.towcanada.ca/digital-editions](https://www.towcanada.ca/digital-editions)
 *  Thread Starter [Springtide](https://wordpress.org/support/users/reneyoung/)
 * (@reneyoung)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17536664)
 * Now it started working. All I did was go through the settings again, leaving 
   them as they were because I couldn’t find anything incorrect, and saved it again.
   Weird.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17546062)
 * [@reneyoung](https://wordpress.org/support/users/reneyoung/) – Awesome, glad 
   its working. Do you use caching, that might explain it.

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

The topic ‘JSON parse error when editing rule’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-when-editing-rule/#post-17546062)
 * Status: resolved