Forums

{new_record} saves twice

yigal 09 Sep, 2009
Am I not clear or there is no solution for this? Is it a known bug?
menchee 14 Oct, 2009
I have the same problem...
Any idea?

Emanuel.
yigal 15 Oct, 2009
This hasn't been solved for me yet.
It happens in the first connection I created, and didn't happen in the other ones.
So in the first connection I had to manually enter a link for the form instead of using new_record.
menchee 15 Oct, 2009
I'm using the backend data view, with the integral SAVE button at the toolbar.
Saving an existing record works fine.
Adding a new one - creates two records.
mickylog 22 Oct, 2009
I had the same problem in the last few days. It seems that, if your form has the "DB Connection>Enable Data Storage" flag set to Yes on Chronoforms Admin Panel, if you use the same form on Chrono Connectivity Backend, it generates a double record while adding a new one. So, my advice is to CLONE your form, set the Enable Data Storage to No and use this copy with Chrono Connectivity Backend.

I hope this helps.

Mike
menchee 23 Oct, 2009
Hi Mike,
Yes - your solution works!
Thanks a lot.

Max - do you follow this issue?

Emanuel.
bottomupwebs 28 Nov, 2009
I've had the same problem - so I turned the DB connection/Enable Data storage to Off in Chronoforms.

Now the {recordtime} field does not get filled out.🙄
greatnikita 11 Dec, 2009
so, has anyone found a solution, fix to this? I am using connectivity to create/edit/delete data on the front end, and just as with other people, making new record by using {new_record} creates two identical entries. If i disable db writing, then the data gets recorded fine and just once BUT IP, date, user id, and other useful system stuff gets lost(e.g. blank in the database).

The temporary solution of mine was to simply link to the form itself for creating new record, but that means no control over group privileges(i mean it will have access level as the page hosting the link, while i might want only 'authors' and above to be able to create new entries, but for everyone to see it).


An idea I tried was this - for the form, in chronoforms, set the db write on and point to a dump table, which is not the same as the database used by connectivity. Then, in the onsumbit before email part of the form, write the same thing that is in the autocode, but replace dump table with connectivity table. This worked - I was getting one entry, and the missing fields appeared BUT now any time i clicked submit I would not go back to the previous page, but instead get blank white screen, so i have to click 'back' to return to the original page. I tried using redirect url, and even inserting redirect code into the onsubmit part, but still i get the blank page.


Any ideas, fixes?
cb75ter 13 Jan, 2010
Hello,

I have the same problem with Chrono Connectivity when creating a new record with {new_record}.

I noticed that if you edit your form in Chronoform Form Management & if you edit the following field in the DB connection tab:
Saving data/emails order: before email

Then, the record isn't saved twice anymore in the DB.

BUT, you then can't add any record from a Chronoform Form linked by a Joomla! menu.

This might help, but I guess that there is a bug there.
Grumpster 11 Feb, 2010
Had the same problem here using both ChronoConnectivity AND Chronoforms.

I followed the advice above, but also set Enable Data Storage to NO under the DB Connection tab in the Chronoforms form management view.

Seems counterintuitive to do that, but ChronoConnectivity seems to have its own ability to enable data storage, but it also triggers the Chronoforms form to submit the data too.

Downside to this approach, according to another post I read (I haven't tested it myself) is that if you were using the regular Chronoforms' form on a menu link, it will be disabled. But, with C-Connectivity, you won't need that form, right?🙂
efil 05 Apr, 2010
Hello, I have exactly the same problem.
Is there a solution?

Thanks!
GreyHead 05 Apr, 2010
Hi efil,

Exactly which problem to you have - there are several in this thread; and there are also solutions or workarounds for most of them if you read through.

Bob
efil 05 Apr, 2010
a double record while creating a new record with {new_record}on CC page.
cb75ter 05 Apr, 2010
Hello efil,

You'd rather read the thread, especially last posts... You would save time.

Regards
efil 05 Apr, 2010
In DB connection tab i tried:Saving data/emails order: before email.
It still save twice.

I set Enable Data Storage to NO under the DB Connection tab.
It don't save at all.
cb75ter 05 Apr, 2010
Then I can't help you, because it works by my side.
Sorry.
underspeed 02 Jul, 2011

so, has anyone found a solution, fix to this? I am using connectivity to create/edit/delete data on the front end, and just as with other people, making new record by using {new_record} creates two identical entries. If i disable db writing, then the data gets recorded fine and just once BUT IP, date, user id, and other useful system stuff gets lost(e.g. blank in the database).

The temporary solution of mine was to simply link to the form itself for creating new record, but that means no control over group privileges(i mean it will have access level as the page hosting the link, while i might want only 'authors' and above to be able to create new entries, but for everyone to see it).


An idea I tried was this - for the form, in chronoforms, set the db write on and point to a dump table, which is not the same as the database used by connectivity. Then, in the onsumbit before email part of the form, write the same thing that is in the autocode, but replace dump table with connectivity table. This worked - I was getting one entry, and the missing fields appeared BUT now any time i clicked submit I would not go back to the previous page, but instead get blank white screen, so i have to click 'back' to return to the original page. I tried using redirect url, and even inserting redirect code into the onsubmit part, but still i get the blank page.


Any ideas, fixes?



Hi,

I have same problem like Greatnikita's. Anybody fixed it?
GreyHead 02 Jul, 2011
Hi underspeed,

About three posts before that one

I had the same problem in the last few days. It seems that, if your form has the "DB Connection>Enable Data Storage" flag set to Yes on Chronoforms Admin Panel, if you use the same form on Chrono Connectivity Backend, it generates a double record while adding a new one. So, my advice is to CLONE your form, set the Enable Data Storage to No and use this copy with Chrono Connectivity Backend.


Bob
underspeed 02 Jul, 2011
Hi GreyHead,

I tried it, but it's same result. I can add a record from frontend but i cannot see from frontent. Because uid, recordtime, ipaddress and cf_user_id not recorded, only cf_id, name, email, subject and message recorded. I see it from backend and phpmyadmin.

Also please remember, i use filter in WHERE SQL like;

<?php
$user =& JFactory::getUser();
if ( !in_array($user->gid, array('24', '25')) ) {
// user is not an admin
echo "WHERE `cf_user_id` = '{$user->id}'";
}
?>

I cannot see records if i select "Enable Data storage : No" or "Saving Data/Emails order: Before Email". Is it a bug?

I explained it clearly?
GreyHead 02 Jul, 2011
Hi underspeed,

I get round it by not using the {edit_record} links but build links directly to the forms and using the form DB Connection to save.

This does mean that I have to add my own user control in the form HTML.

Bob
underspeed 02 Jul, 2011
GreyHead,

I select turn off the DB Connection on the copy. So i add a record, but i can't see on frontend. Because uid, recordtime, ipaddress and cf_user_id not recorded, only cf_id, name, email, subject and message recorded.

Also i remove {edit_record} from anywhere. Same result.
This topic is locked and no more replies can be posted.