Title: Javascript Error Notice on Console
Last modified: March 11, 2021

---

# Javascript Error Notice on Console

 *  Resolved [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * (@darkpollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-notice-on-console/)
 * Hi,
    The plugin seems to work fine, but when I save the new restriction it will
   generate an error on the chrome console.
 *     ```
       {key: "a27df8ac6a455ad2dc7ddb28dc6", type: "warning", message: "Illegal string offset 'restrictions'", file: "wp-content/plugins/content-control/classes/Options.php", line: 106, …}
       component: "Plugin: content-control"
       file: "wp-content/plugins/content-control/classes/Options.php"
       key: "a27df8a62046c6a455ad2dc7ddb28dc6"
       line: 106
       message: "Illegal string offset 'restrictions'"
       stack: (3) ["JP\CC\Options::update()", "JP\C\A\Ajax::options_autosave()", "do_action('wp_ajax_jp_cc_options_autosave')"]
       type: "warning"
       __proto__: Object
       ```
   
 * That is the error.
    WordPress 5.6.2. And the restrcition cannot be saved.

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

 *  Thread Starter [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * (@darkpollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-notice-on-console/#post-14168834)
 * Ok, so it seems after saving the restriction I need to click again on Save on
   the restriction list.
    That is a little weird but that at least save the restriction.
   The error is still there though.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-notice-on-console/#post-14204472)
 * [@darkpollo](https://wordpress.org/support/users/darkpollo/) – Strange. I wonder
   if you can see what the value of jpcc_settings in wp_options currently is. The
   only possibility is that it was set to something other than an array, but our
   code would never do that so I’m not sure whether it was due to migration or weird
   edge case.
 * Essentially the error says our settings array was not an array.
 * I’ve added some code to ensure its an array properly, but in your case you might
   end up having to delete the jpcc_settings option entirely to reset it.
 * Hope that helps.

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

The topic ‘Javascript Error Notice on Console’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-notice-on-console/#post-14204472)
 * Status: resolved