I created a CF to user registration.
When I try to register a user using the form, it returns to a PHP error message:
Does any one know how to fix it?
ps. I have others CF and the those send e-mail correctly. The user registration is the only one that appears this error.
When I try to register a user using the form, it returns to a PHP error message:
Fatal error: Call to undefined method JUtility::sendMail() in /home/storage/8/0f/0d/damianikoerich6/public_html/exemplo/administrator/components/com_chronoforms/form_actions/joomla_registration/joomla_registration.php on line 271
Does any one know how to fix it?
ps. I have others CF and the those send e-mail correctly. The user registration is the only one that appears this error.
Hi ianmaciel,
Which version of Joomla! is this? If it is version 3.0 then it's probably a ChronoForms bug as the old email method has been deprecated.
Bob
Which version of Joomla! is this? If it is version 3.0 then it's probably a ChronoForms bug as the old email method has been deprecated.
Bob
Yes, exactly. I'm running Joomla 3.0.3.
How can I chance it to the new method?
How can I chance it to the new method?
Any ideas?
I know php but I don't know Joomla methods and functions...
If anyone could help me giving me the guidelines I could fix the code.
Thanks,
Ian
I know php but I don't know Joomla methods and functions...
If anyone could help me giving me the guidelines I could fix the code.
Thanks,
Ian
I found some information saying to change 'JUtily::sendMail' by 'JMail::getInstance()->sendMail'.
I changed so it stopped displaying error but no e-mail are sent (it is supposed to send an activation e-mail).
Any ideas?
I changed so it stopped displaying error but no e-mail are sent (it is supposed to send an activation e-mail).
Any ideas?
Hi ianmaciel,
That looks like the correct fix to me. Whether or not it sends emails depends on how you have the action configured. By default the standard Joomla! emails are used I think.
Bob
Here's the code change I worked out. Find this code about line 217 of /administrator/components/com_chronoforms/form_actions/joomla_registration/joomla_registration.php
Bob
That looks like the correct fix to me. Whether or not it sends emails depends on how you have the action configured. By default the standard Joomla! emails are used I think.
Bob
Here's the code change I worked out. Find this code about line 217 of /administrator/components/com_chronoforms/form_actions/joomla_registration/joomla_registration.php
$return = JUtility::sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);
and replace it with $mail =& JFactory::getMailer();
$return = $mail->sendMail( $data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody );
Bob
Then I get the error saying the body of the message is empty.
:(
Warning: sprintf() [function.sprintf]: Too few arguments in /home/storage/8/0f/0d/damianikoerich6/public_html/exemplo/libraries/joomla/language/text.php on line 235
:(
Hi ianmaciel,
Hmmm . . . that's a PHP Warning, not technically an error and it's in the Joomla! language handling code which ChronoForms doesn't use. It's possible it's called from somewhere in the Mailer code though.
Easiest solution is to set the site Error Reporting to System Default or None when you go live.
Bob
Hmmm . . . that's a PHP Warning, not technically an error and it's in the Joomla! language handling code which ChronoForms doesn't use. It's possible it's called from somewhere in the Mailer code though.
Easiest solution is to set the site Error Reporting to System Default or None when you go live.
Bob
This topic is locked and no more replies can be posted.