Did you upgrade to WP 6.1? The YAARP plugin broke for me when I upgraded to WP 6.1. I turned on/off each plugin and the only one that causes a problem is YAARP.
Note that the plugin does indicate it’s not yet compatible with WP 6.1.
Hey @marios-alexandrou yea i think so too, its because of the v 6.1, I hope the devs fix it asap so we can install it š
I don’t have a blank screen, but the page does not render properly.
WP Query plugin reports the following:
Fatal error: Uncaught Error: round(): Argument #1 ($num) must be of type int|float, string given
in /xxx/public_html/wp-content/plugins/yet-another-related-posts-plugin/includes/template_builtin.php on line 33
Pila de llamadas:
round()
wp-content/plugins/yet-another-related-posts-plugin/includes/template_builtin.php:33
include()
wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php:1655
YARPP::get_template_content()
wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php:1527
YARPP::display_related()
wp-content/plugins/yet-another-related-posts-plugin/includes/related_functions.php:25
yarpp_related()
wp-content/themes/twentyseventeen-child-es/functions.php:141
twentyseventeen_entry_footer()
wp-content/themes/twentyseventeen-child-es/template-parts/post/content.php:163
require()
wp-includes/template.php:785
load_template()
wp-includes/template.php:718
locate_template()
wp-includes/general-template.php:204
get_template_part()
wp-content/themes/twentyseventeen/single.php:24
include()
wp-includes/template-loader.php:106
require_once()
wp-blog-header.php:19
require()
index.php:17
What’s really odd is that if I refresh the page, the problem goes away.
But if I go back to the home page and click on the link to a page it appears again until I press refresh.
Do we have the same issue?
Update: this only happens to me as a logged-in user. A visitor hitting a cached page does not experience this issue.
-
This reply was modified 4 months, 3 weeks ago by
cnxsoft.
Hey,
I’ve got the same error and it seems it related somehow with php8, because on php8.0 and php8.1 doesn’t work, but when I change to php7.4 everything is back to normal.
I was forced to change PHP from 7.4 to 8.x by the hoster of my webpage AND updated to the latest WP version at the same time.
Since then I am having the same error messages. One of the two is responsible. Either the new WP version or PHP8.x … had to deactivate the plugin for now and am hoping for an update.
@cnxsoft yea same issue for me only on admin login.
The get_the_score() function returing a string instead of an int or float. When the round() was called on a string, it gives a fatal error.
Quick and dirty solution I came up with is to type cast the value as float and then call the round().
on file wp-content/plugins/yet-another-related-posts-plugin/includes/template_builtin.php line 33 I edited as follows and it worked.
$round = round( (float)get_the_score(), 1 );
-
This reply was modified 4 months, 2 weeks ago by
Shabab. Reason: minor edit
-
This reply was modified 4 months, 2 weeks ago by
Shabab. Reason: typo fix
@shabab its a pretty great solution ngl, I hope the devs see this and fix it up, I bet there might be some other changes to do as well.
Plugin Author
yarpp
(@jeffparker)
Thanks all. We are aware of the issue and expect to push out an update today. Thank you again for your patience.
@jeffparker Awesome bro, can’t wait!
@jeffparker I know the development process is complicated and its been more than a day and still the plugin hasnt been updated, Any ETA? as my site is losing ranking a users because i have the plugin disabled atm.
@gtasaisgood I think the plugin only impacts the admin, so I have not disabled it at all. You can test your website in a private Window to check or log out.
@cnxsoft You should double-check that it’s not caching that is resulting in the page looking OK when you’re not logged in. If it is caching, then once the cache clears the page won’t look right regardless of being logged in or not. In my case, I see the problem when logged in or not.