Support » Plugin: YARPP - Yet Another Related Posts Plugin » Fatal error upgrading to php 8
Fatal error upgrading to php 8
-
Hi
I tried to upgrade to php 8 but I got a fatal error message.
As I can see in my logs, it seems to be caused by /wp-includes/class-wp-hook.phpIs there anything I can do for solving this issue?
Thank you
-
We tested YARPP on PHP 8 just the other day and all appeared to be fine.
Can you please share the entire error log?
You can send it to support at yarpp dot com (and reference this ticket) if you don’t want to share the error log here.
Hi Jeff.
Thank you so much for your message.This is what I can see:
`[05-Mar-2022 08:51:27 UTC] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in /home2/javiypil/public_html/japon-secreto.com/wp-includes/class-wp-hook.php:307
Stack trace:
#0 /home2/javiypil/public_html/japon-secreto.com/wp-includes/plugin.php(189): WP_Hook->apply_filters()
#1 /home2/javiypil/public_html/japon-secreto.com/wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php(96): apply_filters()
#2 /home2/javiypil/public_html/japon-secreto.com/wp-content/plugins/yet-another-related-posts-plugin/includes/init_functions.php(5): YARPP->__construct()
#3 /home2/javiypil/public_html/japon-secreto.com/wp-includes/class-wp-hook.php(307): yarpp_init()
#4 /home2/javiypil/public_html/japon-secreto.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#5 /home2/javiypil/public_html/japon-secreto.com/wp-includes/plugin.php(474): WP_Hook->do_action()
#6 /home2/javiypil/public_html/japon-secreto.com/wp-settings.php(587): do_action()
#7 /home2/javiypil/public_html/japon-secreto.com/wp-config.php(90): require_once(‘/home2/javiypil…’)
#8 /home2/javiypil/public_html/japon-secreto.com/wp-load.php(50): require_once(‘/home2/javiypil…’)
#9 /home2/javiypil/public_html/japon-secreto.com/wp-login.php(12): require(‘/home2/javiypil…’)
#10 {main}
thrown in /home2/javiypil/public_html/japon-secreto.com/wp-includes/class-wp-hook.php on line 307I hope this helps.
Thank you
🙂
@javiypilar does the error go away if you disable YARPP?
Also,
1. are you using the latest version of YARPP?
2. how are you including YARPP on the page? Automatic placement, shortcode, block, function, something else?@javiypilar ping!
Hi
Excuse me. I was very busy.
Well, these are my results:
Yep, the error does go away when I disable YARP.
1.- Yes, I’m using the last version
2.- I’m using YARP as automatic placementYou can see one of my posts here: https://japon-secreto.com/viajar-japon-himeji-castillo-blanco/
At the end of the post, below “ArtÃculos Relacionados:”
A few more questions:
– which version of PHP 8 are you running where you see the error
– could you please share the list of other plugins you have installed/activated (and are all of them updated?)I tried PHP 8 and 8.1
My plugins:
Ad Inserter
Akismet Anti-Spam
Contact Form 7
Download Monitor
Flamingo
GDPR Cookie Compliance
Imagify
LuckyWP Table of Contents
Modern Events Calendar
OMGF
Perfmatters
Redirection
Site Kit by Google
WE-Varnish-Cache
WP Rollback
WP Rocket
Yoast SEO@javiypilar would you be able to disable other plugins one by one (while YARPP is enabled) to see if one of them may be causing an issue with YARPP on PHP8? Would greatly help.
For example, with one of our other plugins, there was a PHP8 issue only when WP Rocket was also installed and JS/CSS minification was enabled in WP Rocket.
- You must be logged in to reply to this topic.