• Resolved Stefano

    (@stefacchio)


    Hi,

    if I enable Optimize HTML via Dom ParserImproves HTML minification efficiency option I get this PHP error on frontend:

    Fatal error: Uncaught TypeError: Cannot assign null to property DOMElement::$id of type string in /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/Dependencies/voku/helper/AbstractSimpleHtmlDom.php:174 Stack trace: #0 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/Dependencies/voku/helper/HtmlMinDomObserverOptimizeAttributes.php(146): PoweredCache\Dependencies\voku\helper\AbstractSimpleHtmlDom->__set() #1 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/Dependencies/voku/helper/HtmlMin.php(1688): PoweredCache\Dependencies\voku\helper\HtmlMinDomObserverOptimizeAttributes->domElementAfterMinification() #2 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/Dependencies/voku/helper/HtmlMin.php(1667): PoweredCache\Dependencies\voku\helper\HtmlMin->notifyObserversAboutDomElementAfterMinification() #3 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/Dependencies/voku/helper/HtmlMin.php(1370): PoweredCache\Dependencies\voku\helper\HtmlMin->minifyHtmlDom() #4 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/FileOptimizer.php(301): PoweredCache\Dependencies\voku\helper\HtmlMin->minify() #5 /var/www/vhosts/stefanofattori.it/httpdocs/wp-content/plugins/powered-cache/includes/classes/FileOptimizer.php(191): PoweredCache\FileOptimizer->maybe_minify_html() #6 [internal function]: PoweredCache\FileOptimizer->process_buffer() #7 /var/www/vhosts/stefanofattori.it/httpdocs/wp-includes/functions.php(5427): ob_end_flush() #8 /var/www/vhosts/stefanofattori.it/httpdocs/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all() #9 /var/www/vhosts/stefanofattori.it/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #10 /var/www/vhosts/stefanofattori.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /var/www/vhosts/stefanofattori.it/httpdocs/wp-includes/load.php(1280): do_action() #12 [internal function]: shutdown_action_hook() #13 {main} thrown in

    I use a VPS with plesk, NGINX

    Server webnginx/1.26.1
    PHP8.3.11 (supporta valori a 64bit)
    PHP SAPI fpm-fcgi
    Versione di cURL7.88.1 OpenSSL/3.0.14
    WordPress 6.6.2

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

    (@m_uysl)

    hi @stefacchio,

    Thanks for your report! It looks like there’s a compatibility issue with a package we’re using for HTML minification (https://github.com/voku/HtmlMin/issues/93). As a temporary workaround, you can either downgrade your PHP version to 8.2 or disable the HTML minification feature for now.

    Thread Starter Stefano

    (@stefacchio)

    Hi @m_uysl thank you for your fast reply!

    Ok for the moment I’ll disable the feature, do you know when will be an update for fix the issue?
    What exactly does disabling this option change?

    Plugin Author Mustafa Uysal

    (@m_uysl)

    Ok for the moment I’ll disable the feature, do you know when will be an update for fix the issue?

    I can’t give an ETA for now, but I will try to update the dependency once it is fixed.

    What exactly does disabling this option change?

    That option determines whether HtmlDomParser is being used for HTML minification or not.

    Generally, if your server supports compression methods like gzip or Brotli, the impact of HTML minification on performance is minimal, you can completely turn of that feature.

    • This reply was modified 5 months, 2 weeks ago by Mustafa Uysal.
    Plugin Author Mustafa Uysal

    (@m_uysl)

    hi @stefacchio,

    I’ve released a new update and I think this problem has been fixed with the new version. Could you give it a try?

    (marking as resolved for now, feel free to update this thread)

    Thread Starter Stefano

    (@stefacchio)

    Hi @m_uysl it seems to work perfectly! Thanks!

    Can I ask a last question?

    I found another problem… often when I click ‘UPDATE ALL SETTINGS AND CLEAR ALL CACHE’ the settings are saved but the cache is not emptied, I have to force the emptying of the cache in the top bar of wordpress. Also could you add all the cache emptying buttons that are in the WP bar also in a section of the plugin page? Not everyone has the WP bar.
    Thanks

    Plugin Author Mustafa Uysal

    (@m_uysl)

    hey @stefacchio,

    often when I click ‘UPDATE ALL SETTINGS AND CLEAR ALL CACHE’ the settings are saved but the cache is not emptied

    That button works similarly to the admin bar purge. If your website holds too many cached pages, it can take some time. If you have enabled async purging, it can lead to a delay in purging operations.

    Please check the size of cache folder before/after you click on the button.

    Also could you add all the cache emptying buttons that are in the WP bar also in a section of the plugin page? Not everyone has the WP bar.

    Update settings and clear all cache button is enough for that.

    Thread Starter Stefano

    (@stefacchio)

    @m_uysl ok great! Thank you!

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