13

Hi I bought this new fancy domain name and now I'm in trouble. I was trying to set that into store email addresses in Magento admin. And got the above error. What do I do?

(I've also attempted to change it in the DB. But I can't find the table holding it)

4

Run the following statement:

SELECT * 
FROM  `core_config_data` 
WHERE  `path` LIKE  '%email%'
LIMIT 0 , 30

You can basically edit the values there. The main ones you'll want to look at are:

  • trans_email/ident_general/email,
  • trans_email/ident_salse/email, and
  • trans_email/ident_support/email

P.S.

I don't get an error when validating that email address in 1.7.0.2, you could try a local override of the following Model:

app/code/core/Mage/Adminhtml/Model/System/Config/backend/Email/Address.php from:

protected function _beforeSave()
{
    $value = $this->getValue();
    if (!Zend_Validate::is($value, 'EmailAddress')) {
        Mage::throwException(Mage::helper('adminhtml')->__('Invalid email address "%s".', $value));
    }
    return $this;
}

to

protected function _beforeSave()
{
    $value = $this->getValue();
    /*if (!Zend_Validate::is($value, 'EmailAddress')) {
        Mage::throwException(Mage::helper('adminhtml')->__('Invalid email address "%s".', $value));
    }*/
    return $this;
}

This basically bypasses the validation process.

21

You didn't specify which version of Magento you are using but I'm assuming it's < CE 1.9.1.0 or < EE 1.14.1.0. In this case the solution is to upgrade Magento to CE 1.9.1.0.

Magento uses Zend Framework (or more specific: the class Zend_Validate_Hostname) to validate the top level domain.

In CE 1.9.0.0 and the corresponding EE version, Magento used Zend Framework 1.12.3. This version didn't support the new top level domains. Because of this the validations both in frontend and backend fail.

In CE 1.9.1.0 and EE 1.14.1.0, Magento updated Zend Framework to 1.12.7. This version implements several new top level domains, one of them being .florist.

Having said that, there are also other top level domains currently not supported in the current version of Magento. In Zend Framework 1.12.10 which is not yet included, there was another update of the hostname validation adding many new addresses.

You could:

  • copy lib/Zend/Validate/Hostname.php to app/code/local/Zend/Validate/Hostname.php
  • get the file Zend_Validate_Hostname from 2014/10/24 (it's to long to copy the file so please go to GitHub),
  • copy the $_validTlds variable from the GitHub-hosted version to your Hostname.php and
  • replace

    // First check TLD
    $matches = array();
    if (preg_match('/([^.]{2,10})$/i', end($domainParts), $matches) ||
    

    with

    // First check TLD
    $matches = array();
    if (preg_match('/([^.]{2,63})$/i', end($domainParts), $matches) ||
    

This will allow new top level domains, including the ones which are longer than 10 characters.

  • as this gets resolved by an update, I would directly change the file instead of copy the class into a codepool(causes only to forgett this and getting problems after the update then) – Flyingmana Feb 10 '15 at 21:09
  • Do you have a confirmation that there will be an update to 1.12.10? If yes then I agree. – Matthias Zeis Feb 10 '15 at 22:23
  • Still in 1.9.2.4 this hasn't been updated.. – Erfan Jun 6 '16 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.