I have 1.5.1 and am trying the latest release for chronofirms.
Mu probem is that the emails sent to the registering person contain nothing but SEND_MSG_ACTIVATE and the admins get an empty message with SEND_MSG_ADMIN in it.
Line 245 of cf_joomla_registration.php is:
$message2 = sprintf ( JText::_( 'SEND_MSG_ADMIN' ), $row->name, $sitename, $name, $email, $username);
If this is followed by echo $message2 to debug the statement it produces:
SEND_MSG_ADMIN
and not the message
Any ideas? I checked the language files and SEND_MSG_ADMIN is defined.
James
Hi James,
Looking at this I don't think there should be quotes round the Define. Try JText::_( SEND_MSG_ADMIN ) and see if that does the trick.
Bob
Hi,
I am also experiencing problem with the msg sent. As described by the original poster, I get SEND_MSG_ADMIN instead of the whole message.
I tried to remove the ' ' and it did not help.
Any other suggestion?
Ah I see!
Thanks for your quick replies.
I'll try that now.
It seems both the constants not being defined and the syntax are wrong.
When I uncomment the constants i get:-
Notice: Use of undefined constant SEND_MSG_ACTIVATE - assumed 'SEND_MSG_ACTIVATE' in
on line 283
Notice: Use of undefined constant SEND_MSG_ADMIN - assumed 'SEND_MSG_ADMIN' in
on line 315
Notice: Use of undefined constant REG_COMPLETE_ACTIVATE - assumed 'REG_COMPLETE_ACTIVATE' in
on line 252
Shouldn't this be using the messages defined in Community Builder?
In fact, wouldn't it be best to have Community Builder handle the emailing? (no idea if this is possible, but it would be ideal)
Hi wizdum,
Please read message #8974 just above, it has two fixes for this.
Oh, and Joomla is doing the mailing.
Bob
Hi GreyHead,
The constants used are not defined anywhere currently. I understand i can add them myself but my question is can the plugin use the messages already configured in Community Builder?
Hi wizdum,
Yes they are - in the com_user language file. The default version is language/en-GB/en-GB.com_user.ini
Bob
I copied
language/en-GB.com_user.ini
language/en-GB.com_chronocontact.ini
and this got the emails working. However i still get the notices about the undefined constants and i had to define REG_COMPLETE_ACTIVATE myself.
The emails actually contain the content defined in Community Builder... not the strings foudn in en-GB.com_user.ini/en-GB.com_chronocontact.ini :blink:
Anyway. it seems to be working how i wanted it to.
thanks for the fix.
Yeah. I have done that. Otherwise i wouldnt be getting the "Use of undefined constant" error. It would just use the string.
Unfortunately I don't understand enough about joomla internals to understand what is going on but at least its working :unsure:
Im happy to help in debugging by providing files, output etc.
Hi wizdum,
Thanks, I think this is one for Max to follow up in future releases of the PlugIns.
Bob