Support » Plugin: Content Control - User Access Restriction Plugin » Error reported by my website

  • Resolved YorkshireLad



    My website emailed me to say that there’s a problem with Content Control. Indeed, checking the page that uses it shows no content at all; deactivating the plugin or reverting to version 1.1.0 brings it back to life.

    The message says that and E_ERROR was caused in line 72 of shortcodes.php “Uncaught error: Cannot unset string offsets in /home/…/content-control/classes/Shortcodes.php:72”


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author danieliser


    @yorkshirelad – Appreciate the report. Can you tell me what shortcodes your currently using?


    I’m getting a similar issue.

    I’m using [content_control][/content_control] to wrap text on a Woocommerce product description, and when I visit the page, the page is rendering a mobile view (while on desktop) and only lists the product title, price and then the message “The site is experiencing technical difficulties”


    Plugin Author danieliser


    @darrylr – Thanks for the report, can you by chance check your PHP error logs and see what the error messaging is?

    We are gonna try to duplicate that as well.

    @danieliser – sorry for the delay in replying, I thought the forum would let me know when you replied… must check my email address.

    Looking at the Page in question, the shortcodes I’ve used are ones I’ve written to return (not echo!) some simple database information (first post, most recent post, name of person logged in).

    I’m also using Force Login by Kevin Vess, so that visitors can’t see anything beyond the home page if they’re not logged in, and with much less content than logged-in visitors.

    Does that help?


    Here’s the errors:

    Warning: Illegal string offset '' in /var/www/clients/client25/web610/web/wp-content/plugins/content-control/classes/Shortcodes.php on line 71
    Fatal error: Uncaught Error: Cannot unset string offsets in /var/www/clients/client25/web610/web/wp-content/plugins/content-control/classes/Shortcodes.php:72 Stack trace: #0 /var/www/clients/client25/web610/web/wp-content/plugins/content-control/classes/Shortcodes.php(38): JP\CC\Shortcodes::normalize_empty_atts('1') #1 /var/www/clients/client25/web610/web/wp-includes/shortcodes.php(325): JP\CC\Shortcodes::content_control('', '</p>\n<p style="...', 'content_control') #2 [internal function]: do_shortcode_tag(Array) #3 /var/www/clients/client25/web610/web/wp-includes/shortcodes.php(199): preg_replace_callback('/\\[(\\[?)(galler...', 'do_shortcode_ta...', '[content_contro...') #4 /var/www/clients/client25/web610/web/wp-includes/class-wp-hook.php(286): do_shortcode('[content_contro...') #5 /var/www/clients/client25/web610/web/wp-includes/plugin.php(208): WP_Hook->apply_filters('[content_contro...', Array) #6 /var/www/clients/client25/web610/web/wp-content/plugins/woocommerce/templates/single-product/short-description.php(24): in /var/www/clients/client25/web610/web/wp-content/plugins/content-control/classes/Shortcodes.php on line 72

    @yorkshirelad – Apologies for hijacking your thread, hopefully this will help solve your issue too.



    I can confirm that my issue is now resolved with the latest update. Thank you!

    Plugin Author Frank Corso


    Awesome! Thanks @darrylr. I am glad we were able to get this one figured out and solved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.