Sign in to follow this  
Followers 0
Daniel1350036114

[Solved]Bug: sprintf()-warning after registration

3 posts in this topic

This error appears after registering a new account, when it tells you that your account has been created and you have to verify it by clicking the link in the confirmation email. It will only appear if you have activated the system notification property, so that Joomla will send an email to at least one administrator after someone has registered on your site.

The Problem can be found in line 129 in ajax.php (v.2.4.0) or if you use the latest version (v.2.4.1) in line 326 in helper.php. It will try to set the email subject by using the sprintf-function (JText::sprintf) with 'COM_USERS_EMAIL_REGISTERED_BODY' as first argument. But this one is for the body of the email that gets send to the user (with no account verification). The corresponding translation uses three placeholders (%s) but in this case only two extra arguments (username and sitename) are given to the sprintf-function. That causes the "Too few arguments"-Warning.

Solution:

Replace the string 'COM_USERS_EMAIL_REGISTERED_BODY' in the mentioned lines above with 'COM_USERS_EMAIL_ACCOUNT_DETAILS' for example. The translation of this one only uses two placeholders so there should be no problem that there are "only" two arguments. It worked for me.

I only have basic knowledge of Joomla an php but this looks to me as if this was not intended. If I'm wrong please delete this post.

Greetings

m0nk3y

chinhpv likes this

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0