• Resolved darkpollo

    (@darkpollo)


    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

    (@darkpollo)

    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

    (@danieliser)

    @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.