Support » Plugin: W3 Total Cache » Problem with Elementor text Widget + Minify + 0.9.7.3 and up

  • Resolved edemir206

    (@edemir206)


    We have a very weird problem since version 0.9.7.3 of w3tc

    To reproduce the problem the steps below should be done:

    1) Activate minify on w3tc
    2) Create a new page with the plugin “Elementor”
    3) Add a new Text Widget from elementor. (Not the wordpress widget the elementor one)
    4) Insert the following text:

    “O Centro de Processamento de Dados da Universidade Federal de Santa Maria é onde se concentra toda estrutura computacional, sendo assim responsável por planejar, projetar, implementar e coordenar o desenvolvimento de Sistemas de Informação, provendo serviços, segurança e soluções de qualidade na área de Tecnologia de Informação. Com serviços que percorrem uma vasta gama de atividades de TI, sempre priorizando os usuários e visando a facilidade no dia-a-dia de quem faz uso dos sistemas, sítios e portais sob domínio da UFSM.”

    5) Save the.

    After doing this, the page becomes blank.

    This problem affects many pages on our multisite setup because a lot of pages uses this elementor text widgets.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    Does the issue occur only when Minify is active? DO you have any other caching solution installed?

    Thread Starter edemir206

    (@edemir206)

    The problem occurs only when minify is active. We also have Redis cache enabled.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    Is minify enabled on Auto or Manual? Also, does the issue persists if you disable HTML minify in Performance>Minify?

    Thread Starter edemir206

    (@edemir206)

    Hi Marko,

    Minify is enabled in Auto, tested in manual mode no change.

    Disabled minify in Performance > Minify and the problem does not happen anymore.

    But we really need html minify active as it increases a lot the performance in the client side.

    Thread Starter edemir206

    (@edemir206)

    Marko,

    I’ve been debugging here and found something:

    In the file wp-content/plugins/w3-total-cache/lib/Minify/Minify/HTML.php

    If I revert theses lines (140 up to 151) from version 0.9.7.4:

    // remove ws around block/undisplayed elements
    		$this->_html = preg_replace('/\\s+(<\\/?(?:area|article|aside|base(?:font)?|blockquote|body'
    			.'|canvas|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|figcaption|figure|footer|form'
    			.'|frame(?:set)?|h[1-6]|head|header|hgroup|hr|html|legend|li|link|main|map|menu|meta|nav'
    			.'|ol|opt(?:group|ion)|output|p|param|section|t(?:able|body|head|d|h||r|foot|itle)'
    			.'|ul|video)\\b[^>]*>)/iu', '$1', $this->_html);
    
    		// remove whitespaces outside of all elements
    		$this->_html = preg_replace(
    			'/>((\\s)(?:\\s*))?([^<]+?)((\\s)(?:\\s*))?</u'
    			,'>$2$3$5<'
    			,$this->_html);

    to the version 0.9.7.2:

    // remove ws around block/undisplayed elements
    		$this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
    			.'|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
    			.'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
    			.'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
    			.'|ul)\\b[^>]*>)/i', '$1', $this->_html);
    
    		// remove whitespaces outside of all elements
    		$this->_html = preg_replace(
    			'/(^|>)\\s+\\b([^<]+)\\b\\s+?(<|$)/'
    			,'$1 $2 $3'
    			,$this->_html);

    The HTML minify works after this revert.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,
    This is a valid issue. We’ve added an issue for this and it will be fixed in the future release.
    Thank you for bringing this to our attention and thank you for your patience.

    Thread Starter edemir206

    (@edemir206)

    Hello Marko,

    Dropping here to tell you the fix you included in 0.9.7.5 works fine for us now, we can finally update w3tc

    Thanks!

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @edemir206,
    Glad to know the issue is resolved!

    Thread Starter edemir206

    (@edemir206)

    Marko,

    Sorry for dropping here again, but we found that some of our pages are still facing problems with minify. The problem is the same above and switch back to the version 0.9.7.2 fixes the problem 🙁

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Problem with Elementor text Widget + Minify + 0.9.7.3 and up’ is closed to new replies.