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
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
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?
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?
Hi d3vilr3d,
There's a problem that the language file is not loaded until the user is logged in๐
My solution was to copy the defines I needed into my code box. Max suggested a more elegant solution
There's a problem that the language file is not loaded until the user is logged in๐
My solution was to copy the defines I needed into my code box. Max suggested a more elegant solution
you can make a copy of the com_user language file in the languages folder and rename it to com_chronocontact too and this will solve it!
Bob
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)
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
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?
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
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.
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.
Hi wizdum,
Glad it's working for you. I think that you probably have to take the quotes from around the language defines to get them working so it has to be, for example:
Glad it's working for you. I think that you probably have to take the quotes from around the language defines to get them working so it has to be, for example:
JText::_( REG_COMPLETE_ACTIVATE )
and notJText::_( 'REG_COMPLETE_ACTIVATE' )
Bob
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.
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.
This topic is locked and no more replies can be posted.