Support » Plugin: SEO Plugin by Squirrly SEO » Output buffer issue

  • Resolved Nextendweb

    (@nextendweb)


    Hi @calinvingan,
    I’m the developer of Smart Slider 3 and one of our customer informed us about a conflict between your plugin + WPRocket + Smart Slider. We do use output buffer too and in the past I gained a lot of experience in this topic. I checked your code and made a fix which should work in every case. 🙂

    Edit the class SQ_Models_Frontend

    Remove: private $_buffer = false;

    Replace getBuffer method with:

    /**
     * Get the loaded buffer and change it
     *
     * @param string $buffer
     * @param int  $phase
     * @return string
     */
    public function getBuffer($buffer, $phase) {
    
    	if ($phase & PHP_OUTPUT_HANDLER_FINAL || $phase & PHP_OUTPUT_HANDLER_END) {
    		return apply_filters('sq_buffer', $buffer);
    	}
    
    	return $buffer;
    }

    The key is to use the $phase variable. Probably you have those “tricks” in the original source to run it only once.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Calin Vingan

    (@calinvingan)

    Thank you for your suggestion. Really appreciate it.

    We will check your code and implement it in the plugin if it’s working with all our test cases.

    Best regards,
    Calin

Viewing 1 replies (of 1 total)
  • The topic ‘Output buffer issue’ is closed to new replies.