Language string failed to load: invalid_address:

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
piranhac
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Apr 01, 2011 11:55 am

Language string failed to load: invalid_address:

Post by piranhac » Fri Apr 01, 2011 12:09 pm

Ok I am running Joomla 1.6.0 and have rsformspro installed. Everytime I submit a form I get the following error

Language string failed to load: invalid_address:

The form still submits and I still get an email sent with the data, but just for a split second it shows the error. I spoke to the rsjoomla guys and they responded with

"Note that the respective error message is generated by the PHPMailer class from Joomla!, not by RSForm! Pro, as the component uses the default Joomla! functions in order to send out emails."


I have tried to send the form using PHP Mail, SMTP and sendmail.
PHP Mail and SMTP both produce the error mentioned above.

Sendmail produces a different error "Could not execute: /usr/sbin/sendmail"

Any help would be much appreciated.


System Information

PHP Built On: Linux earth.websiteactive.com 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64
Database Version: 5.0.91-community
Database Collation: latin1_swedish_ci
PHP Version: 5.2.12
Web Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
WebServer to PHP Interface: cgi
Joomla! Version: Joomla! 1.6.0 Stable [ Onward ] 10-Jan-2011 23:00 GMT
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)



Thanks
Last edited by humvee on Tue May 01, 2012 4:11 pm, edited 1 time in total.
Reason: Marked as resolved for OP

jsecompany
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Apr 02, 2011 10:23 pm

Re: Language string failed to load: invalid_address:

Post by jsecompany » Sat Apr 02, 2011 10:33 pm

I have been banging my head against the wall with this same issue, and I am unimpressed with the support saying it's not their issue, without really offering any idea on how to solve the issue. What good is a form, when the user sees an error message? Especially when you are processing payments.

Anyway, I found a work-around. This is far from a solution, but it works for me. I've been using Joomla for 5+ years, but I only know enough PHP to make me dangerous (as in messing things up dangerous).

Here is what worked for me.

Find the file: libraries/phpmailer/language/phpmailer.lang-joomla.php

Code: Select all

<?php
/**
 * PHPMailer language file.
 * English Version
 

$PHPMAILER_LANG = array();

$PHPMAILER_LANG["provide_address"] = JText::_('PHPMAILER_PROVIDE_ADDRESS');
$PHPMAILER_LANG["mailer_not_supported"] = JText::_('PHPMAILER_MAILER_IS_NOT_SUPPORTED');
$PHPMAILER_LANG["execute"] = JText::_('PHPMAILER_EXECUTE');
$PHPMAILER_LANG["instantiate"] = JText::_('PHPMAILER_INSTANTIATE');
$PHPMAILER_LANG["authenticate"] = JText::_('PHPMAILER_AUTHENTICATE');
$PHPMAILER_LANG["from_failed"] = JText::_('PHPMAILER_FROM_FAILED');
$PHPMAILER_LANG["recipients_failed"] = JText::_('PHPMAILER_RECIPIENTS_FAILED');
$PHPMAILER_LANG["data_not_accepted"] = JText::_('PHPMAILER_DATA_NOT_ACCEPTED');
$PHPMAILER_LANG["connect_host"] = JText::_('PHPMAILER_CONNECT_HOST');
$PHPMAILER_LANG["file_access"] = JText::_('PHPMAILER_FILE_ACCESS');
$PHPMAILER_LANG["file_open"] = JText::_('PHPMAILER_FILE_OPEN');
$PHPMAILER_LANG["encoding"] = JText::_('PHPMAILER_ENCODING');
$PHPMAILER_LANG["signing"]  = JText::_('PHPMAILER_SIGNING_ERROR');*/
I moved the */ to the end of the code to grey out the error messaging.

Now, load up your phpmailer file here: /libraries/phpmailer/phpmailer.php

FIND THIS:

Code: Select all

 'invalid_address' => 'invalid address',
It's on line 868 on mine.

This is what I changed mine to:

Code: Select all

 'invalid_address' => 'Connecting to Paypal for processing',
Now, the error message still displays... but now it says "Connecting to Paypal for Processing". This way, the end user is none the wiser... and it doesn't show error messages. I disabled the user e-mail, so this error message only shows once. If you have ADMIN and USER e-mail's both turned on, whatever message you put in will be doubled.

I am sure there is an easier way, in fact if I play around and test a bit more I am sure I will be able to hide the messages altogether, somebody with some PHP knowledge can hopefully shed some light on this.

I had to get my form up ASAP, as I have people ready to register and PAY for my event.

Hope this helps you get up and running... if I come across a way to turn off the message completely, I will post it.

piranhac
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Apr 01, 2011 11:55 am

Re: Language string failed to load: invalid_address:

Post by piranhac » Mon Apr 04, 2011 12:26 am

jsecompany, thanks for the reply ... you put me on the right track.

I checked the phpmailer and found it was running

| Software: PHPMailer - PHP email class |
| Version: 5.1

Basically I reverted to an earlier version of the phpmailer

| Software: PHPMailer - PHP email class |
| Version: 2.0.4

This eliminates the error, so unless you need some of the add functionality of 5.1 reverting back to an earlier version may fix your problem.

DFDaniel
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Apr 22, 2011 2:14 pm

Re: Language string failed to load: invalid_address:

Post by DFDaniel » Fri Apr 22, 2011 2:19 pm

Hi,

The latest Version of PHPMailer now checks, whether email address parameters really contain proper values. So in previous versions, the following used to work fine:

Code: Select all

$email = "";
$name = "Foo";
$mail->addReplyTo( array($email, $name) );
Now you should check whether email parameters are non-empty and valid before setting them - otherwise the "Language string failed to load: invalid_address" message shows up.

Just learned that on my own when I updated my DFContact contact form component (http://software.filzhut.de) to avoid that issue.

Cheers,
Daniel

User avatar
adam_nz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 157
Joined: Thu Nov 03, 2005 7:21 am
Location: Auckland - New Zealand
Contact:

Re: Language string failed to load: invalid_address:

Post by adam_nz » Tue Apr 26, 2011 4:20 pm

I get exactly the same error. Grrrrrr. It looks to me that Joomla isn't passing the value of the contact email to phpmailer.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language string failed to load: invalid_address:

Post by infograf768 » Sat Apr 30, 2011 5:19 pm

piranhac wrote: Database Collation: latin1_swedish_ci

OT: Collation SHOULD be UTF8.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

rsmerali
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu May 12, 2011 2:20 pm

Re: Language string failed to load: invalid_address:

Post by rsmerali » Thu May 12, 2011 3:08 pm

Hi,

I'm pretty new to Joomla, and I don't think I'm trying to do anything "hard". My old Joomla 1.5.X site got hacked, so I have a new site running 1.6.3 and the built-in beez5 template. All I want to do is add a "Contact Us" page. I think I have all of that (at least it looks right), but when you fill out the form and click "> Send Email", it goes to a page that says:

Language string failed to load: invalid_address: You must provide at least one recipient email address.
Fatal error: Call to a member function get() on a non-object in /home/sidapca/public_html/components/com_contact/controllers/contact.php on line 114

Despite the error, it still sends a confirmation e-mail to the person who filled out the form, but not to the Contact Us e-mail that I entered for this contact. Furthermore, the confirmation e-mail says "This is a copy of the following message you sent to via ...". There's a pretty obvious blank there where it should state the recipient, so it certainly looks like the e-mail address I added on the back-end is not being used.

The fix by "jsecompany" looks like it just changes the error message, but does not solve the issue of undelivered mail.

The fix by "piranhac" sounds like it may work, but I don't know how to revert my version of PHPMailer.

Thank you!,
Rehman

Claudio Romeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jun 24, 2011 5:57 pm

Re: Language string failed to load: invalid_address:

Post by Claudio Romeo » Fri Jun 24, 2011 6:09 pm

I get the same error. I’m using the Italian localization of Joomla 1.6.3, so the text string is in Italian; but the meaning is the same.
Discussing this with my ISP, I found out when it happens, even if not the reason. So, I’ll try to explain, but please forgive any mistakes in my English.
This strange occurrance seems to happen if two conditions concur:
  • * the contact is chosen from a menu item that shows a list of contacts of one category (sorry, I don’t know the English name of such a kind of menu item, but I hope that my description is clear enough)
    * AND there is no menu item pointing to that single contact.
Please note that the mail form of a contact chosen from a menu item showing a list of contacts of one category works even if the menu items pointing to single contacts have been hidden (setting the single contact menu items visible only to the Super User, for example).
So the workaround is quite simple:
  • 1. create one single menu item for every contact you want to show in the list
    2. make these menu items visible only to the Super User
    3. create the menu item pointing to the list of contacts of one category and make it visible to everybody
Magic! It works!

rsmerali
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu May 12, 2011 2:20 pm

Re: Language string failed to load: invalid_address:

Post by rsmerali » Sat Jun 25, 2011 6:31 am

Thank you so much Claudio!! I had given up on this and used an extension for the Contact Us form, but it didn't look as good.
I don't know how to make the menu items only visible to the Super User, so I made them visible to only Registered users, but this did NOT work. So I made the "Single Contact" menu items visible to Public, and put them as sub-items under my menu item that lists all the contacts in the category.
It still looks good, and more importantly, it works!!!

Thank you again,
Rehman
<http://www.sidap.ca>

Claudio Romeo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jun 24, 2011 5:57 pm

Re: Language string failed to load: invalid_address:

Post by Claudio Romeo » Sat Jun 25, 2011 11:47 am

Rehman, you are completely right!
I made quite the same but I didn’t remember it so well...
Hoping it’s useful for you and other users, here is the workaround I used in my personal site (http://www.claudioromeo.it). I want to show a list of contacts of a single category from a TopMenu item (that, you know, has no fair sub-items); more, only the registered users have to be allowed to send emails to the contacts.
  • 1. I create the category of contacts (that was Public, since everybody has to see the description with the advice saying the registration is needed) and two contact (Registered).
    2. In a menu in Position 7 of Beez 2 I define a main item pointing to the contact category (Public) and the single contact sub-items (Public, since the registration is needed by the contacts properties).
    3. I set to Special the access permission of the module associated to the menu, so that neither Public nor Registered users can see it. The whole module is invisible.
    4. In the TopMenu, I create a menu item that is an alias to another menu item (this kind of menu item is very useful): it’s linked to the main menu item pointing to the contact category (see step 2).
That’s all! Everybody sees the TopMenu item and (after having clicked it) reads the description, but only registered users can see the list of contacts and therefor send an email to them.
Thanks to you!
Last edited by Claudio Romeo on Sat Jun 25, 2011 2:11 pm, edited 1 time in total.

ashishsingh
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Oct 30, 2011 7:11 am

Re: Language string failed to load: invalid_address:

Post by ashishsingh » Sun Oct 30, 2011 7:20 am

You must provide mail to email address in both user mail section and admin mail section of RSform

eg. not [email protected]

proper valid email address

juanleonardo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Apr 25, 2012 6:21 pm

Re: Language string failed to load: invalid_address:

Post by juanleonardo » Wed Apr 25, 2012 6:48 pm

Dear all, I had the same problem. After exploring the web I found some posts that send me to where I am now.
I was getting this result after submitting a form from a contact that is listed under Show Contacts Category but not from the ones in the Menu Items. (some other posts suggest to put the contacts under menu items, kinda crazy if you have gazillions of contacts)

I have seen entries for bug tracking in the joomlacode site. So here is what I discovered:
Language string failed to load: invalid_address: You must provide at least one recipient email address.
consist of 2 errors, together, one is the language string is not there other wise it will tell you 'Invalid address: You must provide at least one recipient email address.' (maybe the reason it is hard to find the fix in posts directing to the language issue). Anyway this is fixed by adding the missing language lines to the following files (see below, infact the cause is the invalid address line but I added all just in case). Compare to your files I found clues here: https://github.com/joomla/joomla-platfo ... 7d3#diff-0

File /libraries/phpmailer/language/phpmailer.lang-joomla.php

Code: Select all

<?php
/**
 * PHPMailer language file.
 * English Version
 */
// no direct access
defined('_JEXEC') or die;

// $PHPMAILER_LANG = array();

$PHPMAILER_LANG["provide_address"] = JText::_('PHPMAILER_PROVIDE_ADDRESS');
$PHPMAILER_LANG["mailer_not_supported"] = JText::_('PHPMAILER_MAILER_IS_NOT_SUPPORTED');
$PHPMAILER_LANG["execute"] = JText::_('PHPMAILER_EXECUTE');
$PHPMAILER_LANG["instantiate"] = JText::_('PHPMAILER_INSTANTIATE');
$PHPMAILER_LANG["authenticate"] = JText::_('PHPMAILER_AUTHENTICATE');
$PHPMAILER_LANG["from_failed"] = JText::_('PHPMAILER_FROM_FAILED');
$PHPMAILER_LANG["recipients_failed"] = JText::_('PHPMAILER_RECIPIENTS_FAILED');
$PHPMAILER_LANG["data_not_accepted"] = JText::_('PHPMAILER_DATA_NOT_ACCEPTED');
$PHPMAILER_LANG["connect_host"] = JText::_('PHPMAILER_CONNECT_HOST');
$PHPMAILER_LANG["file_access"] = JText::_('PHPMAILER_FILE_ACCESS');
$PHPMAILER_LANG["file_open"] = JText::_('PHPMAILER_FILE_OPEN');
$PHPMAILER_LANG["encoding"] = JText::_('PHPMAILER_ENCODING');
$PHPMAILER_LANG["signing"]  = JText::_('PHPMAILER_SIGNING_ERROR');
$PHPMAILER_LANG['smtp_error'] = JText::_('PHPMAILER_SMTP_ERROR');
$PHPMAILER_LANG['empty_message'] = JText::_('PHPMAILER_EMPTY_MESSAGE');
$PHPMAILER_LANG['invalid_address'] = JText::_('PHPMAILER_INVALID_ADDRESS');
$PHPMAILER_LANG['variable_set'] = JText::_('PHPMAILER_VARIABLE_SET');
$PHPMAILER_LANG['smtp_connect_failed'] = JText::_('PHPMAILER_SMTP_CONNECT_FAILED');
$PHPMAILER_LANG['tls'] = JText::_('PHPMAILER_TLS');
file: /libraries/phpmailer/language/phpmailer.lang-en.php

Code: Select all

<?php
/**
 * PHPMailer language file.
 * English Version
 */

$PHPMAILER_LANG = array();

$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
                                     'recipient email address.';
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
                                       'recipients failed: ';
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
$PHPMAILER_LANG["signing"]  = 'Signing Error: ';
$PHPMAILER_LANG['smtp_error'] = JText::_('SMTP server error: ');
$PHPMAILER_LANG['empty_message'] = JText::_('Message body empty');
$PHPMAILER_LANG['invalid_address'] = JText::_('Invalid address');
$PHPMAILER_LANG['variable_set'] = JText::_('Cannot set or reset variable: ');
and after modifying those still the erro but with different strings so I ended up modifying: /language/en-GB/en-GB.ini (included only the PHP_MAILER lines

Code: Select all

PHPMAILER_PROVIDE_ADDRESS="You must provide at least one recipient email address."
PHPMAILER_MAILER_IS_NOT_SUPPORTED=" Mailer is not supported."
PHPMAILER_EXECUTE="Could not execute: "
PHPMAILER_INSTANTIATE="Could not instantiate mail function."
PHPMAILER_AUTHENTICATE="SMTP Error! Could not authenticate."
PHPMAILER_FROM_FAILED="The following from address failed: "
PHPMAILER_RECIPIENTS_FAILED="SMTP Error! The following recipients failed: "
PHPMAILER_DATA_NOT_ACCEPTED="SMTP Error! Data not accepted."
PHPMAILER_CONNECT_HOST="SMTP Error! Could not connect to SMTP host."
PHPMAILER_FILE_ACCESS="Could not access file: "
PHPMAILER_FILE_OPEN="File Error: Could not open file: "
PHPMAILER_ENCODING="Unknown encoding: "
PHPMAILER_SIGNING_ERROR="Signing error: "
PHPMAILER_SMTP_ERROR="SMTP server error: "
PHPMAILER_EMPTY_MESSAGE="Message body empty "
PHPMAILER_INVALID_ADDRESS="Invalid address "
PHPMAILER_VARIABLE_SET="Cannot set or reset variable: "
So after this the error was finally displayed properly!! (still an error) so found what is causing it the error comes from this lines

Code: Select all

      echo $this->Lang('invalid_address').': '.$address;
      return false;
in the bit:

Code: Select all

private function AddAnAddress($kind, $address, $name = '') {
. There is where I am. If I discover how I will post later. Anyone know what to do next to make the form work? (clicking send to me sends me email but not to the contact which the form is related to).

juanleonardo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Apr 25, 2012 6:21 pm

Re: Language string failed to load: invalid_address:

Post by juanleonardo » Wed Apr 25, 2012 7:15 pm

Ok continuing with the follow up... Uncommenting the:

Code: Select all

//  echo $this->Lang('invalid_address').': '.$address;
gives 'You must provide at least one recipient email address.' meaning that the value for to: cc: or bcc: is 0 in:

Code: Select all

  public function Send() {
    try {
    if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
        throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);
    }
But the same form sends mail correctly :S when contact is a 'Single contact' 'Menu item'. .. frustration... btw it is Joomla! 1.6.3 Stable [ Onward ] 18-Apr-2011 23:00 GMT

juanleonardo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Apr 25, 2012 6:21 pm

Re: Language string failed to load: invalid_address:

Post by juanleonardo » Wed Apr 25, 2012 8:25 pm

here http://forum.joomla.org/viewtopic.php?t=620971 I seems I've found the answer...

juanleonardo
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Apr 25, 2012 6:21 pm

Re: Language string failed to load: invalid_address:

Post by juanleonardo » Wed Apr 25, 2012 9:30 pm

juanleonardo wrote:here http://forum.joomla.org/viewtopic.php?t=620971 I seems I've found the answer...
Problem solved BUT not when using the beez5 template and choosing the Encyclopedia layout for the form (in contacts/contact manager options/contact layout) so the problem is the template. Even substituting the template form layout using the default doesn't work. The I substituted the file from the template in the joomla default and the error appears again. :S so there is something going on with the template file and the template override (if that's how it is called).

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language string failed to load: invalid_address:

Post by infograf768 » Thu Apr 26, 2012 7:11 am

But the same form sends mail correctly :S when contact is a 'Single contact' 'Menu item'. .. frustration... btw it is Joomla! 1.6.3 Stable [ Onward ] 18-Apr-2011 23:00 GMT
1.Test on 2.5.4 or last SVN. Forget 1.6.x and 1.7.x. These are obsolete AND vulnerable.
2. If a bug is still present, open a tracker on joomlacode
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

thurmma
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 07, 2007 6:13 pm

Re: Language string failed to load: invalid_address:

Post by thurmma » Tue May 01, 2012 1:19 pm

juanleonardo wrote:here http://forum.joomla.org/viewtopic.php?t=620971 I seems I've found the answer...
Thank you very much for this link! It worked perfectly.


Locked

Return to “General Questions/New to Joomla! 2.5”