Plugin Author
Alimir
(@alimir)
Hi @nimla
Thank you for choosing wp ulike.
Please try to enable wp debug log and check the error message. Then we can find the reason for this issue.
Debugging in WordPress
Thread Starter
nimla
(@nimla)
Hi, thank you very much for the fast response! As recommended, the WP Debug module is giving me the following error message when I am clicking the heart symbol in catalog pages:
[24-Dec-2020 11:05:09 UTC] PHP Fatal error: Uncaught Error: Using $this when not in object context in /Users/adminuser/Local Sites/webproject/app/public/wp-content/plugins/wp-ulike/inc/hooks/third-party.php:627
Stack trace:
#0 /Users/adminuser/Local Sites/webproject/app/public/wp-includes/class-wp-hook.php(289): wp_ulike_purge_wp_fastest_cache(4593, ‘_liked’)
#1 /Users/adminuser/Local Sites/webproject/app/public/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /Users/adminuser/Local Sites/webproject/app/public/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
#3 /Users/adminuser/Local Sites/webproject/app/public/wp-content/plugins/wp-ulike/inc/classes/class-wp-ulike-cta-listener.php(154): do_action_ref_array(‘wp_ulike_after_…’, Array)
#4 /Users/adminuser/Local Sites/webproject/app/public/wp-content/plugins/wp-ulike/inc/classes/class-wp-ulike-cta-listener.php(129): wp_ulike_cta_listener->afterUpdateAction(Array)
#5 /Users/adminuser/Local Sites/webproject/app/public/wp-content/plugins/wp-ulike/ in /Users/adminuser/Local Sites/webproject/app/public/wp-content/plugins/wp-ulike/inc/hooks/third-party.php on line 627
Again, thank you so much for your help!
Plugin Author
Alimir
(@alimir)
Hi @nimla
Yeah, that’s an issue with our recent updates! We will fix this issue in the next update.
But until then, You can try to replace $this parameter with $cache_interface.
if(isset($url["path"])){
if($url["path"] == "/"){
$cache_interface->rm_folder_recursively( $cache_interface->getWpContentDir("/cache/all/index.html") );
}else{
// to prevent changing path with ../ or with another method
if($url["path"] == realpath(".".$url["path"])){
$cache_interface->rm_folder_recursively( $cache_interface->getWpContentDir("/cache/all").$url["path"] );
}
}
}
Thread Starter
nimla
(@nimla)
Hi @alimir, you’re a pro! Thanks a lot for this workaround. I am happy for the choice of this plugin. Wish you all the best Sir!
Plugin Author
Alimir
(@alimir)
@nimla You’re welcome. :)))