Patch 5.6 to accept new top level domain extensions
Permalink
What file do we edit to have the most recent version v5.6 to allow domain extensions? We have a client with a .services domain and 5.6 will not let us put this anywhere, says invalid for email.
Very frustrating. What file do we edit to fix this?
Thanks.
Very frustrating. What file do we edit to fix this?
Thanks.
Try it with .services
I think it's a length issue.
I think it's a length issue.
Ahhh! yes looks like limit on the the field. Must be a hack somewhere for that.
On line 22 of concrete/core/helpers/validation/strings.php you will see
change it to
This will allow TLD extensions that are 8 characters in length instead of only 7 characters.
Probably best to over-ride this file rather than hack the Core file..
if (preg_match('/^([a-zA-Z0-9\._\+-]+)\@((\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,7}|[0-9]{1,3})(\]?))$/', $em, $matches)) {
change it to
if (preg_match('/^([a-zA-Z0-9\._\+-]+)\@((\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,8}|[0-9]{1,3})(\]?))$/', $em, $matches)) {
This will allow TLD extensions that are 8 characters in length instead of only 7 characters.
Probably best to over-ride this file rather than hack the Core file..
As a follow up..
To override this core file, create a folder called 'validation' in the root/helpers folder.
Copy the strings.php file from the concrete/core/helpers/validation folder into the root/helpers/validation folder.
Change line 13 from this
To this
And also change the code in line 22 as in my first post..
To override this core file, create a folder called 'validation' in the root/helpers folder.
Copy the strings.php file from the concrete/core/helpers/validation folder into the root/helpers/validation folder.
Change line 13 from this
class Concrete5_Helper_Validation_Strings {
To this
class ValidationStringsHelper extends Concrete5_Helper_Validation_Strings {
And also change the code in line 22 as in my first post..
Thank you!!!
But there are domain extensions that are longer than 8 characters, so I'll probably change it to higher. We've gone one client using a .consulting
thanks again.
But there are domain extensions that are longer than 8 characters, so I'll probably change it to higher. We've gone one client using a .consulting
thanks again.
Just for reference, from our registrar, 14 characters is the longest domain extension so far.
I can report this worked, although I had to clear cache first.
Thanks again!
I'd make the suggestion that if another 5.6 patch comes out that this gets included because the alt tlds are getting more wide spread.
Thanks again!
I'd make the suggestion that if another 5.6 patch comes out that this gets included because the alt tlds are getting more wide spread.
Maybe this should go into the next update.
Im running <meta name="generator" content="concrete5 - 5.6.3.2" />
and Ive got it set up not problemo. See attached.