3

This question already has an answer here:

UPDATE: While I got the answer I needed down below, this question was later asked again in this post and received a more elaborate answer.

My magento store is hosted on a 'new' gTLD (.boutique), but Magento does not allow me to set the store email addresses with this tld.

I understand that Magento's validation runs through the Zend framework and the responsible file for validating the TLDs is 'Hostname.php' in /lib/Zend/Validate/. However, adding all the TLDs from http://data.iana.org/TLD/tlds-alpha-by-domain.txt as suggested in this thread on the Magento forums did not solve my problem.

I thought perhaps it was an issue with Magento storing the previous Zend file in a cache, so I already tried clearing all cache files from the cache management page; this did not resolve the problem.

Am I overlooking any other arrays or such that should include all the TLDs? Should I clear the cache in another way? Anything else altogether?

Any help is much appreciated.

EDIT: I was naughty and actually edited the Zend file in /lib/Zend/Validate/Hostname.php after making a Hostname.php.bak file in the same dir. Moving the edited Hostname.php file to /app/code/local/Zend/Validate/ and restoring the original Hostname.php.bak in the Zend library as suggested by the marked answer solved the problem.

marked as duplicate by Fabian Schmengler, Marius Feb 24 '15 at 7:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

I just tested this and it worked perfectly. What did you do exactly? My steps are:

  1. Copy ./lib/Zend/Validate/Hostname.php to ./app/code/local/Zend/Validate/Hostname.php.
  2. Added ", 'test'" to the $_validTlds array on line 136.
  3. Tried to save the store e-mail address with a .test domain and it worked.
  • Thank you, that solved it. I added what I did wrong as an edit in the original question. Still somewhat curious why my method wouldn't work though.. – Martin Dec 14 '14 at 22:17

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