Forums

(solved) Deprecated error message (mails) after validation

Repitol 09 Oct, 2013
Hi Bob,
I use Chronoforms V3.1 RC5.5 on a website for a very important form published every year.
This year, as I want to publish the form and test it, I have a deprecated error message on sumbmit
Deprecated: Function ereg() is deprecated in /homez.83/mywebsite/www/components/com_chronocontact/libraries/mails.php on line 117

Could You tell me what's wrong ? It's really urgent as the website is running and the form must run only 2 days for registration.

Thanks for your help.
GreyHead 09 Oct, 2013
Hi repitol,

I think that may have been fixed in the latest release (CFv3.2 I think).

But the easiest fix is to set the Site Error Reporting to System Default or to None which should hide any PHP Notices or Warnings.

Bob
Repitol 09 Oct, 2013
well,
Error is already set as "none" in joomla configuration
It doesn't change anything. 😟
GreyHead 09 Oct, 2013
Hi repitol,

Then it would take an edit of the PHP ini file :-(

Please see this post for a code fix.

Bob
Repitol 09 Oct, 2013
Bad luck, the fix doesn't seem to have effect.
I replaced line 117 from mail.php
if(!ereg("\{IPADDRESS\}", $email_body)){

with
if(!preg_match('/\{IPADDRESS\}/', $email_body)){

but I still have the same error message.
Repitol 09 Oct, 2013
Now it works !!
My Joomla website was still on 1.5.15 version
upgrated to 1.5.26 (last 1.5 version available)
now the form goes well.

Only thing I can't remember is how to configure field validation on wizard edit with V3
(I use V4 on other websites without problems, but this form was made with V3 and I have no time to build it again with V4...) 😶
GreyHead 09 Oct, 2013
Hi Repitol,

how to configure field validation on wizard edit with V3

I think it's the validation tab over on the right.

Bob
Repitol 09 Oct, 2013
Unfortunately, I have no validation tab.
Only Toolbox and properties as shown on file attached
No way to change date of birth validation which gives problem (stays as required when I don't want it to be required)
I'm very confused..... 😶
GreyHead 09 Oct, 2013
Hi Repitol,

Please click the form name link in the Forms Manager to see the tab.

Bob
Repitol 09 Oct, 2013
Ok, when I do it, it shows the normal edit (not wizard)
and on the validation tab, there's nothing in the list proposed
Should I write something at line "9- validate-date-au (a date formatted as; dd/mm/yyyy)" ?
because for the moment, the form doesn't accept any date written as dd/mm/yyyy
or yyyy/mm/dd
and only works when the field is left empty
the very moment a user writes a date of birth, he gets the validation error message 😑

if user writes 12/02/1977
validation error : Please enter a valid date in this format yyyy/mm/dd
so user writes 1977/02/12
validation error : Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.

I'm going maaaad !
Repitol 10 Oct, 2013
Hi,
can you help with this validation issue ?
thanks
GreyHead 10 Oct, 2013
Hi Repitol,

I think that you add the input name in the validation box - but that won't remove whatever validation is there already.

Please post a link to the form so I can take a quick look.

Bob
Repitol 10 Oct, 2013
Bob,
I've found a fix (the problem only apprears with Firefox (my version : 24.0 for mac) )
As seen on another post with a close fix.
Here is the detail for other users having the same issue

Edit files
\www\components\com_chronocontact\libraries\includes\JSvalidation.php
\www\components\com_chronocontact\js\jsvalidation2.js
\www\components\com_chronocontact\js\mooValidation.js

replace every
validate-date-au
in these files
with
valid-date-au

(security : rename in ftp the original files with "-old" extensions, and replace the files with the modified ones)

Then, in Joomla, edit your form (not in wizard mode) by clicking on the name of your form
go to "Form Code"/edit html and modify
<input class="cf_inputbox validate-date-au"
as
<input class="cf_inputbox valid-date-au"

then save your form and test it.
:mrgreen:
GreyHead 11 Oct, 2013
Hi Repitol,

Well found, I'd forgotten about that FireFox bug :-(

Bob
This topic is locked and no more replies can be posted.