• Resolved sachinkothiyal567

    (@sachinkothiyal567)


    Hi,

    After updating this plugin: Content Control. My home is not openable. We got the error: Fatal error: Uncaught ArgumentCountError: Too few arguments to function

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function ContentControl\Controllers\Frontend\Restrictions\PostContent::filter_the_excerpt_if_restricted(), 1 passed in /home/customer/www/staging7.taxsystems.com/public_html/wp-includes/class-wp-hook.php on line 310 and exactly 2 expected in /home/customer/www/staging7.taxsystems.com/public_html/wp-content/plugins/content-control/classes/Controllers/Frontend/Restrictions/PostContent.php:129 Stack trace: #0 /home/customer/www/staging7.taxsystems.com/public_html/wp-includes/class-wp-hook.php(310): ContentControl\Controllers\Frontend\Restrictions\PostContent->filter_the_excerpt_if_restricted(‘Writing about I…’) #1 /home/customer/www/staging7.taxsystems.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘Writing about I…’, Array) #2 /home/customer/www/staging7.taxsystems.com/public_html/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(461): apply_filters(‘get_the_excerpt’, ”) #3 /home/customer/www/staging7.taxsystems. in /home/customer/www/staging7.taxsystems.com/public_html/wp-content/plugins/content-control/classes/Controllers/Frontend/Restrictions/PostContent.php on line 129

    Please solved my problem

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @sachinkothiyal567 – Sorry to hear that. I just looked over everything and the only thing that makes since is that your using a version of WordPress before 4.5, or another plugin (VC in this case), is calling the filter incorrectly.

    If its an older version of WP, it shouldn’t have let you even install it as we marked it for WP 5.6+ only.

    Otherwise is your VC plugin and addons up to date? Might be worth a support ticket to them to let them know there should be another parameter for that filter.

    I can try adding a default value for the second parameter, but we can’t remove it, so I’m not entirely sure the error would be fixed or just masked, the only solutions would be fixing it on the VC side, or disabling our filtering of excerpts if your not using it.

    /home/customer/www/staging7.taxsystems.com/public_html/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(461): apply_filters(‘get_the_excerpt’, ”) 
    Plugin Author Daniel Iser

    (@danieliser)

    @sachinkothiyal567 – Just tried to patch for this, if your still seeing it the only alternative is to unhook that filter.

    Update and let us know.

    if ( function_exists( '\ContentControl\plugin' ) ) {
        remove_filter( 'get_the_excerpt', [ \ContentControl\plugin('Frontend\Restrictions\PostContent'), 'filter_the_excerpt_if_restricted' ], 1000 );
    }

    Hope that helps. Please take a moment to rate & review the plugin and or support to spread the word.

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

The topic ‘after update Content Control plugin given the fatal error.’ is closed to new replies.