Dealing with this same issue. Getting this error on our website after updating to 2.2.12:
Warning: sprintf(): Too few arguments in (...)/wp-content/plugins/wp-user-avatar/includes/class-wp-user-avatar-functions.php on line 668
Will be awesome to get a fix pushed out for us less tech-savvy folk 😉
-
This reply was modified 5 years, 1 month ago by
osmanham.
The formatting string should contains %s for each string. If developers want to use sprintf, correct solution is:
$avatar = sprintf(
'<img src="%s"%s alt="%s" class="avatar avatar-%s wp-user-avatar wp-user-avatar-%s photo avatar-default %s" />',
$wpua_final_avatar_image_src,
$default_image_details['dimensions'],
$alt,
$size,
$size,
esc_attr( implode( ' ', $class ) )
);
@stodorovic +1 for this solution
Nos hemos encontrado con el mismo problema al actualizar, la única solución que encontramos es desactivar el complemento :S 🙁
Moderator
Yui
(@fierevere)
永子
Please, if you have “same issue”, consider opening your own support topics,
or if you are sure it is absolutely same (not all same issues are same, because of many varieties of server and wordpress environments), then just subscribe for this topic on the sidebar.
“Metoo” like replies wont help finding the solution.
from where I can get the previous working version?
It’s possible to download previous versions from wordpress.org (eg. https://downloads.wordpress.org/plugin/wp-user-avatar.2.2.11.zip ).
There are 3 places where is used sprintf function. I hope that an update will be released soon because we already proposed correct solutions (use proper placeholder %s for each string variable).
Everyone please update to 2.2.14.
Let me know if that fixes the issue.
I upgraded to: Version 2.2.14
Still have the issue, but only when i’m logged in :
Warning: sprintf(): Too few arguments in /customers/6/4/d/(…)/httpd.www/wp-content/plugins/wp-user-avatar/includes/class-wp-user-avatar-functions.php on line 666
@teamemilie 2.2.15 should fix your issue.
Let me know if that works.
@collizo4sky
You are right. Thanks and thank you very much for quick fix! Have a pleasent day.
Bast Regards
@collizo4sky fixed. Thanks a lot. JR