• Resolved mron765

    (@mron765)


    Hello, I get a fatal error on trying to use (Save & Optimize / Refresh Cache) the plugin recently. It used to work fine in the past.

    Attached is the error message created by WordPress (sorry it’s German, if you need English please let me know)

    This is solely affecting the backend (…/wp-admin/…), because of the error the local caching of the fonts is not happening and they get loaded from Google server

    Thank you for any help, we love your plugin and would like to continue using it

    ——————————————

    WordPress-Version 6.1.1
    Aktives Theme: Flatsome 3.16.5
    Aktuelles Plugin: OMGF (Version 5.5.2)
    PHP-Version 8.0.27

    Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 181 der Datei /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php verursacht. Fehlermeldung: Uncaught TypeError: ucfirst(): Argument #1 ($string) must be of type string, array given in /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php:181
    Stack trace:
    #0 [internal function]: ucfirst()
    #1 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(181): array_map()
    #2 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(143): OMGF_Optimize_Run->fluent_implode()
    #3 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(50): OMGF_Optimize_Run->optimization_succeeded()
    #4 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(33): OMGF_Optimize_Run->run()
    #5 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(89): OMGF_Optimize_Run->__construct()
    #6 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(63): OMGF_Admin_Optimize->run()
    #7 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(39): OMGF_Admin_Optimize->init()
    #8 /var/www/vhosts/****/httpdocs/wp-content/plugins/host-webfonts-local/includes/class-omgf.php(239): OMGF_Admin_Optimize->__construct()
    #9 /var/www/vhosts/****/httpdocs/wp-includes/class-wp-hook.php(308): OMGF->do_optimize()
    #10 /var/www/vhosts/****/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #11 /var/www/vhosts/****/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #12 /var/www/vhosts/****/httpdocs/wp-admin/admin.php(175): do_action()
    #13 /var/www/vhosts/****/httpdocs/wp-admin/options-general.php(10): require_once(‘…’)
    #14 {main}
    thrown

    • This topic was modified 1 year, 10 months ago by mron765.
    • This topic was modified 1 year, 10 months ago by mron765.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi!

    Could you install and try this beta. Then enable Debug Mode (under Advanced Settings) and run Save & Optimize again. Then head back to the Advanced Settings tab, download the Log file and share it with me (preferably using a service like WeTransfer or FileTransfer)

    Looking forward to hearing from you!

    Thread Starter mron765

    (@mron765)

    Hi Daan, many thanks for the quick response and help. I have tested your Beta (and also the new updated version) and the error can no longer be replicated. So this case can be considered closed and solved ??

    Thanks again for the quick help.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Really? Okay, didn’t expect that. But that’s great to hear ofcourse!

    Marking this as resolved. ??

    Hello,

    I’m getting the same error. Here’s my log, can you please help? Thank you.

    WordPress vers?o 6.1.1
    Tema activo: Storefront (vers?o 4.2.0)
    Plugin actual: OMGF (vers?o 5.5.3)
    PHP vers?o 8.1.11
    
    Detalhes do erro
    ================
    Um erro do tipo E_ERROR foi causado na linha 176 do ficheiro /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php. Mensagem de erro: Uncaught TypeError: ucfirst(): Argument #1 ($string) must be of type string, array given in /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php:176
    Stack trace:
    #0 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(176): ucfirst()
    #1 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(143): OMGF_Optimize_Run->fluent_implode()
    #2 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(50): OMGF_Optimize_Run->optimization_succeeded()
    #3 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(33): OMGF_Optimize_Run->run()
    #4 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(89): OMGF_Optimize_Run->__construct()
    #5 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(63): OMGF_Admin_Optimize->run()
    #6 /home/***/public_html/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(39): OMGF_Admin_Optimize->init()
    #7 /home/***/wp-content/plugins/host-webfonts-local/includes/class-omgf.php(239): OMGF_Admin_Optimize->__construct()
    #8 /home/***/public_html/wp-includes/class-wp-hook.php(308): OMGF->do_optimize()
    #9 /home/***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #10 /home/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #11 /home/***/public_html/wp-admin/admin.php(175): do_action()
    #12 /home/***/public_html/wp-admin/options-general.php(10): require_once('/***...')
    #13 {main}
    ? thrown
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Did you try 5.5.4 I released a few hours ago? That version includes the code that fixed it for @mron765

    I tried it now and at first the site was crashing.
    Then out of curiosity I activated the debug mode, downloaded and cleaned the log, then deactivate it and it is no longer happening.

    For now it seems to be resolved. Thanks

    • This reply was modified 1 year, 9 months ago by nunowp.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Critical Error on “Save & Optimize”’ is closed to new replies.