Plugin Support
qtwrk
(@qtwrk)
now that is weird , because that line is @header() , the @ should silence any error message , what’s your PHP version though ?
Plugin Support
qtwrk
(@qtwrk)
em , I could not reproduce it , maybe some of your plugin interfered , could you please try this on a clean wp and if it happens ?
Im using it on ACF settings page:
add_action('acf/options_page/save', array($this, 'clear_cache_on_acf_settings_page_save'), 99, 2);
static function clear_cache_on_acf_settings_page_save($post_id, $acf) {
if (class_exists('\LiteSpeed\Purge')) {
\LiteSpeed\Purge::purge_all();
}
}
Changed the priority back and forth but nu success. I know I can put the hook in the plugin, but want to have it in my code….
Anything wrong here? I cant see it
But its the same now when IΒ΄ve put acf/options_page/save in the plugin hook list that should clear the cache… same problem
Nah, but I have a custom error catcher that spits it to a Slack chanel… Its not showing, just in the logs. But an error is still an error π
Plugin Support
qtwrk
(@qtwrk)
try
if ( defined('LSCWP_V')) {
do_action( 'litespeed_purge_all' );
}
in that code.
Same problem, but nvm. It just fills up my error log and I wanted to let you know
Plugin Support
qtwrk
(@qtwrk)
emm , it still weirds me , my guess is something else called ob_start() ad flush it before SCWP finishes its operation
I dont have any ob_start() but in a shortcode I have… but that can hardly be an issue:
ob_start();
get_template_part(‘templates/parts/how-to-boxes’);
$output = ob_get_clean();
return $output;
Also get:
Error: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated in /wp-content/plugins/litespeed-cache/src/control.cls.php on line 528
Nevermind… Had an init hook that I changed from priority 10 to 1 and then It worked !