Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Felix Scholze

    (@felix-berlin-design)

    Thank you very much, the first variant helped.

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    [05-Oct-2018 13:13:01 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function codeless_remove_type_attr(), 1 passed in /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php:133
    Stack trace:
    #0 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): codeless_remove_type_attr('<!DOCTYPE html>...')
    #1 /www/htdocs/w013ad9d/webshaped.de/wp-includes/plugin.php(203): WP_Hook->apply_filters('<!DOCTYPE html>...', Array)
    #2 /www/htdocs/w013ad9d/webshaped.de/wp-content/plugins/autoptimize/classes/autoptimizeMain.php(442): apply_filters('autoptimize_htm...', '<!DOCTYPE html>...')
    #3 [internal function]: autoptimizeMain->end_buffering('<!DOCTYPE html>...', 9)
    #4 /www/htdocs/w013ad9d/webshaped.de/wp-includes/functions.php(3743): ob_end_flush()
    #5 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): wp_ob_end_flush_all('')
    #6 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php on line 133
    [05-Oct-2018 13:13:01 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function codeless_remove_type_attr(), 1 passed in /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php:133
    Stack trace:
    #0 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): codeless_remove_type_attr('<!DOCTYPE html>...')
    #1 /www/htdocs/w013ad9d/webshaped.de/wp-includes/plugin.php(203): WP_Hook->apply_filters('<!DOCTYPE html>...', Array)
    #2 /www/htdocs/w013ad9d/webshaped.de/wp-content/plugins/autoptimize/classes/autoptimizeMain.php(442): apply_filters('autoptimize_htm...', '<!DOCTYPE html>...')
    #3 [internal function]: autoptimizeMain->end_buffering('<!DOCTYPE html>...', 9)
    #4 /www/htdocs/w013ad9d/webshaped.de/wp-includes/functions.php(3743): ob_end_flush()
    #5 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): wp_ob_end_flush_all('')
    #6 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php on line 133
    [05-Oct-2018 13:14:03 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function codeless_remove_type_attr(), 1 passed in /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php:133
    Stack trace:
    #0 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): codeless_remove_type_attr('<!DOCTYPE html>...')
    #1 /www/htdocs/w013ad9d/webshaped.de/wp-includes/plugin.php(203): WP_Hook->apply_filters('<!DOCTYPE html>...', Array)
    #2 /www/htdocs/w013ad9d/webshaped.de/wp-content/plugins/autoptimize/classes/autoptimizeMain.php(442): apply_filters('autoptimize_htm...', '<!DOCTYPE html>...')
    #3 [internal function]: autoptimizeMain->end_buffering('<!DOCTYPE html>...', 9)
    #4 /www/htdocs/w013ad9d/webshaped.de/wp-includes/functions.php(3743): ob_end_flush()
    #5 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class-wp-hook.php(286): wp_ob_end_flush_all('')
    #6 /www/htdocs/w013ad9d/webshaped.de/wp-includes/class in /www/htdocs/w013ad9d/webshaped.de/wp-content/themes/bootstrap-for-genesis-4/functions.php on line 133
    Thread Starter Felix Scholze

    (@felix-berlin-design)

    hi frank, I just looked in my errorlog and noticed that there is a bug due to the following function. I disabled the corresponding function but what is the error?

    //* Remove type tag from script and style
    //add_filter('style_loader_tag', 'codeless_remove_type_attr', 10, 2);
    //add_filter('script_loader_tag', 'codeless_remove_type_attr', 10, 2);
    //add_filter('autoptimize_html_after_minify', 'codeless_remove_type_attr', 10, 2);
    function codeless_remove_type_attr($tag, $handle)
    {
        return preg_replace("/type=['\"]text\/(javascript|css)['\"]/", '', $tag);
    }

    Thanks for your help!

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    You have to add the following filter:
    add_filter('autoptimize_html_after_minify', 'codeless_remove_type_attr', 10, 2);

    This this the whole function + filters:

    //* Remove type tag from script and style
    add_filter('style_loader_tag', 'codeless_remove_type_attr', 10, 2);
    add_filter('script_loader_tag', 'codeless_remove_type_attr', 10, 2);
    add_filter('autoptimize_html_after_minify', 'codeless_remove_type_attr', 10, 2);
    function codeless_remove_type_attr($tag, $handle)
    {
        return preg_replace("/type=['\"]text\/(javascript|css)['\"]/", '', $tag);
    }
    Thread Starter Felix Scholze

    (@felix-berlin-design)

    I disabled all plugins. Unfortunately this did not help ??

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    Hi Frank,
    thanks that works!

    Felix Scholze

    (@felix-berlin-design)

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    Das habe ich nun auch probiert wieder keine ?nderung…

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    Gut dann kann es daran nicht liegen…. nutze v.5.5

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    @karsten
    Hab gerade nachgeguckt hatte ich nicht eingestellt.

    Durch die Angabe eines anderen Zwischenspeichers hat sich bis jetzt nichts getan. Hab selbst ein paar Seiten gepostet um zu gucken obs l?uft.

    Thread Starter Felix Scholze

    (@felix-berlin-design)

    Du bist der beste! Danke für das beste share plugin im deutschsprachigen bereich ??

    Felix Scholze

    (@felix-berlin-design)

    Have the same problem !

    Felix Scholze

    (@felix-berlin-design)

    I have the same problem as the other user.
    My WordPress use 3.9.2

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