Forums

New Bug

jbourque 27 Jun, 2007
I just upgraded from 2.0 to 2.14 and now when I edit the form and click save I get the following error:

\r\n\";\r\n}\r\n?>\' WHERE id=\'1\''); window.history.go(-1);

I tried both Firefox and IE and both I get the error.
Max_admin 27 Jun, 2007
Hi,

How did you upgrade ?

Do you have any code in the "auto generated" tab ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 27 Jun, 2007
I exported by tables from the database then uninstalled the component then imported my tables back into the database.
Max_admin 27 Jun, 2007
which tables exactly?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 27 Jun, 2007
I restored jos_chrono_contact and my jos_chronoforms_1 tables which had all my data
Max_admin 27 Jun, 2007
You will need then to add a new field to table jos_chrono_contact `onsubmitcodeb4` LONGTEXT NOT NULL

Then everything should be fine!!

cheers

max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 27 Jun, 2007
That was it.

Thanks,
jbourque 06 Jul, 2007
Max,

After I updated to the latest version my data is no longer writing to the database. Everything has seemed to stop as of June 26th. The AutoGenerated is still pointing to the correct location

<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."' , '".$_POST['Birth_Certificate_Number']."' , '".$_POST['firstname']."' , '".$_POST['mi']."' , '".$_POST['lastname']."' , '".$_POST['dob']."' , '".$_POST['address1']."' , '".$_POST['city']."' , '".$_POST['zip']."' , '".$_POST['school']."' , '".$_POST['Grade']."' , '".$_POST['lastplayed']."' , '".$_POST['email']."' , '".$_POST['sex']."' , '".$_POST['phone']."' , '".$_POST['coach']."' , '".$_POST['team']."' , '".$_POST['sameteam']."' , '".$_POST['newcoach']."' , '".$_POST['newteam']."' , '".$_POST['otherchildren']."' , '".$_POST['father']."' , '".$_POST['fatherocc']."' , '".$_POST['fatherph']."' , '".$_POST['mother']."' , '".$_POST['motherocc']."' , '".$_POST['motherph']."' , '".$_POST['support']."' , '".$_POST['emergency']."' , '".$_POST['emerph']."' , '".$_POST['emerph2']."' , '".$_POST['allergies']."' , '".$_POST['medical']."' , '".$_POST['physician']."' , '".$_POST['docph']."' , '".$_POST['insurance']."' , '".$_POST['insph']."' , '".$_POST['policyname']."' , '".$_POST['number']."' , '".$_POST['S1']."' , '".$_POST['emt']."' , '".$_POST['relationship2']."' , '".$_POST['date']."' , '".$_POST['S2']."' , '".$_POST['conduct']."' , '".$_POST['B1']."' , '".$_POST['B2']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
Max_admin 06 Jul, 2007
Hi,

Yes, We have added a new filed to record IP, so the first 3 fields should be :


$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES  (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' ,
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 07 Jul, 2007
Hey Max thanks again for the help. So I added it as you stated but still no go with data being sent to the database. This is what I have now.

<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."','".$_POST['Birth_Certificate_Number']."' , '".$_POST['firstname']."' , '".$_POST['mi']."' , '".$_POST['lastname']."' , '".$_POST['dob']."' , '".$_POST['address1']."' , '".$_POST['city']."' , '".$_POST['zip']."' , '".$_POST['school']."' , '".$_POST['Grade']."' , '".$_POST['lastplayed']."' , '".$_POST['email']."' , '".$_POST['sex']."' , '".$_POST['phone']."' , '".$_POST['coach']."' , '".$_POST['team']."' , '".$_POST['sameteam']."' , '".$_POST['newcoach']."' , '".$_POST['newteam']."' , '".$_POST['otherchildren']."' , '".$_POST['father']."' , '".$_POST['fatherocc']."' , '".$_POST['fatherph']."' , '".$_POST['mother']."' , '".$_POST['motherocc']."' , '".$_POST['motherph']."' , '".$_POST['support']."' , '".$_POST['emergency']."' , '".$_POST['emerph']."' , '".$_POST['emerph2']."' , '".$_POST['allergies']."' , '".$_POST['medical']."' , '".$_POST['physician']."' , '".$_POST['docph']."' , '".$_POST['insurance']."' , '".$_POST['insph']."' , '".$_POST['policyname']."' , '".$_POST['number']."' , '".$_POST['S1']."' , '".$_POST['emt']."' , '".$_POST['relationship2']."' , '".$_POST['date']."' , '".$_POST['S2']."' , '".$_POST['conduct']."' , '".$_POST['B1']."' , '".$_POST['B2']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
Max_admin 07 Jul, 2007
yes sorry, you will need to add a 3rd column with name ipaddress type text to the table, do this with PHPmyadmin, you can create a new table for dummy form too and see how the table will be constructed.

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 07 Jul, 2007
Max,

I just created a test form and the field you are referring to does not get created

<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_4 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:s")."' , '".$_POST['Birth_Certificate_Number']."' , '".$_POST['firstname']."' , '".$_POST['mi']."' , '".$_POST['lastname']."' , '".$_POST['dob']."' , '".$_POST['address1']."' , '".$_POST['city']."' , '".$_POST['zip']."' , '".$_POST['school']."' , '".$_POST['Grade']."' , '".$_POST['lastplayed']."' , '".$_POST['B1']."' , '".$_POST['B2']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
GreyHead 08 Jul, 2007
Hi jbourque,

The AutoGenerate works OK for me with v2.2.1 (it's new in that version). Here's a sample:
<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES  (
'' , '". date('Y-m-d')." - ".date('H:i:s')."', '".$_SERVER['REMOTE_ADDR']."' , '".$_POST['field_name_1']."' , '".$_POST['field_name_2']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>

Later: tested and seems to work OK with old database tables.

Bob

Post edited by: GreyHead, at: 2007/07/08 17:16<br><br>Post edited by: GreyHead, at: 2007/07/08 17:17
Max_admin 10 Jul, 2007
Hi Jbourque, sorry but iam away for a few days, how it was ? as Bob shows the field is created right, are you using V2.2.1 ?

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbourque 11 Jul, 2007
Max and Bob,

The autogenerate works however there is no data being written to the database since I did the upgrade to 2.2.1

Joe
GreyHead 11 Jul, 2007
Hi Joe,

How did you upgrade?
Does the database table for the form still exist? (it's called something like 'jos_chronoforms_4')

Bob
Max_admin 11 Jul, 2007
Hi Joe,

Open jos_chronocontact, find the form you are using, now look at the id column, get this number, now look for another table its name is jos_chronoforms_"thisnumbe", can you find it ?

for best and fast results, just create another form or may be copy the old one and remake table since a new table wont be created upon copy

cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.