Forums

Blank activation email using joomla registration plugin!

rumelle1 05 May, 2010
I created a form using the registration plugin to replace joomlas default registration. I was attempting to edit the joomla default activation email and ended up with this error message upon submitting the chrono registration form. It continues to happens even after I restored the original settings. Also, I now get a blank email instead of the default activation email with activation url and user details. When I register using Joomlas default registration everything works fine. I need this working ASAP but am at a loss with this error message and blank activation emails!

Warning: sprintf() [function.sprintf]: Too few arguments in /home/mysite/public_html/components/com_chronocontact/plugins/cf_joomla_registration.php on line 470



As far as I can figure, line 470 is somewhere in here:

$subject = sprintf ( JText::_( 'Account details for' ), $name, $sitename);
$subject = html_entity_decode($subject, ENT_QUOTES);

if ( $useractivation ){
$message = sprintf ( JText::_( 'SEND_MSG_ACTIVATE' ), $name, $sitename, $siteURL."index.php?option=com_user&task=activate&activation=".$user->get('activation'), $siteURL, $username, $password);
} else {
$message = sprintf ( JText::_( 'SEND_MSG' ), $name, $sitename, $siteURL);
}

$message = html_entity_decode($message, ENT_QUOTES);

GreyHead 05 May, 2010
Hi rumelle1,

Line 470 is this one I think
$message = sprintf ( JText::_( 'SEND_MSG_ACTIVATE' ), $name, $sitename, $siteURL."index.php?option=com_user&task=activate&activation=".$user->get('activation'), $siteURL, $username, $password);
For that to work correctly there should be six placeholders in the language text. The English version is
SEND_MSG_ACTIVATE=Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can use it.\nTo activate the account click on the following link or copy-paste it in your browser:\n%s\n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s
You'll see that there are six %s in there. I suspect that your version is missing one of these somehow.

Bob
rumelle1 05 May, 2010
Is there another language file other than mysite/language/en-GB/en-GB.com_user.ini that I should be looking at? This is what I have there, with a bit before and after just in case it helps. Mine at SEND_MSG_ACTIVATE seems to be the exact same as what you've posted. Maybe I'm looking at the wrong language file?


SEND=Send SEND_MSG=Hello %s,\n\nThank you for registering at %s.\n\nYou may now log in to %s using the username and password you registered with.
SEND_MSG_ACTIVATE=Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can use it.\nTo activate the account click on the following link or copy-paste it in your browser:\n%s\n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %sSEND_MSG_ADMIN=Hello %s,\n\nA new user has registered at %s.\nThis e-mail contains their details:\n\nName: %s\nE-mail: %s\nUsername: %s\n\nPlease do not respond to this message. It is automatically generated and is for information purposes only.
GreyHead 05 May, 2010
Hi rumelle1,

Looks as though you may be missing a line-break here . . .%s\nPassword: %sSEND_MSG_ADMIN=Hello . . .

SEND_MSG_ADMIN=Hello . . . must start on a new line

Bob
rumelle1 05 May, 2010
Wow...this has definitely revealed my skill level, haha. That fixed the problem, thanks a lot!
This topic is locked and no more replies can be posted.