Re: Syntax of email address rejected --> RESOLVED
Bruno Costacurta <[email protected]> Sat, 15 Mar 2014 11:54:32 +0100
| Newsgroups | gmane.comp.horde.turba |
|---|---|
| Message-ID | <20140315115432.Horde.xziIp1UBJIUzFRsRxrtaeQ9@webmail.costacurta.org> |
Quoting Bruno Costacurta <[email protected]>: > Quoting Jan Schneider <[email protected]>: > ... >>> Where is the code of the syntax email address checking ? >> >> Horde_Form_Type_email#validateEmailAddress() in Horde/Form/Type.php. >> -- > > I added log info into the function > Horde_Form_Type_email#validateEmailAddress() in Horde/Form/Type.php > ... > ini_set("error_log", "/tmp/php-error.log"); > error_log( $email ); > ... > to trace the value given to thsi function. > > Very strange behaviour when entering email address into the addressbook. > It's like if eg. the caractere '1' is a separator : > > Log file : > > email '[email protected]' --> OK > [05-Mar-2014 21:23:42 UTC] [email protected] > > email '[email protected]' --> Not-Ok > [05-Mar-2014 21:25:31 UTC] john > [05-Mar-2014 21:25:31 UTC] @mail.com > > Why is the email address broke on certain caracter like '1' ? > My attributes.local.php contains : > > $attributes['homeEmail'] = array( > 'label' => _("Home Email"), > 'type' => 'email', > 'required' => false, > 'params' => array('allow_multi' => true, 'size' => 50, > 'maxlength' => 50,'strip_domain' => false, 'link_compose' => true) > ); > $attributes['workEmail'] = array( > 'label' => _("Work Email"), > 'type' => 'email', > 'required' => false, > 'params' => array('allow_multi' => true, 'size' => 50, > 'maxlength' => 50,'strip_domain' => false, 'link_compose' => true) > ); > > > Bye, > Bruno > Hello, the problem is resolved. I cannot explain what split the email address when it is arriving in function Horde_Form_Type_email#validateEmailAddress() in Horde/Form/Type.php but anyway Turba is working again. As a possible explanation : Few years ago I added two email fields (homeemail and workemail) via the local files attributes and backend. It was working fine since. However it seems (really not sure here) that Turba evolved and added two similar fields. Maybe the split email address came from there ? Not sure at all, but anyway. To resolve my issue : backup my current turba_objects table to preserve my data. delete tables turba_* re-install Turba. copy the original file backends.php to backends.local.php uncomment the lines homeEmail and workEmail into backends.local.php restore my data backup into turba_objects. --> Turba works again. Bye, Bruno -- turba mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]