Subform not saving consistently

Questions related to using nuBuilder Forte.

Subform not saving consistently

Postby chpwebmaster » Wed Sep 11, 2019 10:45 am

BillingForm.png
BillingForm.png (438.71 KiB) Viewed 115 times

I have a billing form (pictured above) that is not saving changes to the main charges/payments subform consistently on records like the one shown adding a payment and hitting the save button saves no problem but forms that have monthly charges dating back years that I have to scroll to the bottom of sometimes save but most are not saving. The nuDebug log states syntax error and the SQL is " UPDATE tblCurrentRentedUnits SET WHERE `BillingID` = '12193'; " for new subform rows that aren't saving. Shouldn't it be running an INSERT for the new record? Editing just the Notes or other main form fields I have had no problem saving on those records that fail on subform inserts.
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby kev1n » Wed Sep 11, 2019 3:43 pm

Hi,

Are you using an auto increment primary key? This can lead to issues while saving and is not recommended.

Recommended Table Structure:
https://wiki.nubuilder.net/nubuilderv3/ ... _Structure

More about this topic:
viewtopic.php?f=19&t=9572&hilit=varchar
kev1n
 
Posts: 244
Joined: Mon Oct 15, 2018 2:13 am

Re: Subform not saving consistently

Postby chpwebmaster » Thu Sep 12, 2019 1:43 am

After testing with changing my primary and foreign keys for the main tables to varchar(25) and running a cascading update against them based on the viewtopic.php?f=19&t=9572&hilit=varchar#p17363
Code: Select all
UPDATE `entreprise` SET `entreprise_id2`= LEFT(MD5(UUID()),15)
code and I'm still seeing the same thing happening i'm getting
Code: Select all
UPDATE tblCurrentRentedUnits SET  WHERE `BillingID` = 'f4d2ec4cb9c0bf7';
queries run when adding rows to the longer histories
that table is also the main table not the subform table it's called tblCharges_Payments
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby kev1n » Thu Sep 12, 2019 12:14 pm

Apart from seeing an error in nuDebug log, are changes still saved inconsistently?
Are you using the latest update?
kev1n
 
Posts: 244
Joined: Mon Oct 15, 2018 2:13 am

Re: Subform not saving consistently

Postby chpwebmaster » Fri Sep 13, 2019 6:31 am

I figured out why it's adding a debug error. Since it's only attempting to save for the subform there are no changes to the main form. I am using the latest release from sourceforge and it is not saving on subform inserts consistently.
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby chpwebmaster » Fri Sep 13, 2019 10:32 am

Update I just saw viewtopic.php?f=20&t=10015 Which sounds almost exactly like the problem I'm having however the version on the main sourceforge page under project activity isn't showing the update but I see it under files now so I will try tomorrow to run the update (I have to make sure I verify/reapply a change I made to output pdf's as files when run and my custom scripts folder) but I'll give it a shot.
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby chpwebmaster » Fri Sep 13, 2019 11:01 pm

Alright I just tried the new version both on my autonumber columns as well as resetting them to the hex UUIDs and they save if there are less than 25-30 rows for me.
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby Janusz » Sat Sep 14, 2019 4:06 am

Hi,
With my specific subform I have it working up to 58 records. If I reduced the number of fields in the subform then I could add few more records.
You wrote it's OK up to about 30 records.

So the conclusion for me was - there is some limitation for total "data container"

and following this path I increased in the php.ini following variable:
max_input_vars 2000 (default is 1000)
and clould easilly go to more then 100 records :-)
Janusz
 
Posts: 220
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Subform not saving consistently

Postby chpwebmaster » Sat Sep 14, 2019 5:13 am

I'm using php7.3 and have max_input_vars set to 1000000000 to try to eliminate any problem.
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Re: Subform not saving consistently

Postby chpwebmaster » Sat Sep 14, 2019 5:42 am

I just checked PHP 7.0 and 7.2 with MAMP and they both work so I'm rolling php on my server back to 7.2
chpwebmaster
 
Posts: 15
Joined: Tue Jun 11, 2019 12:30 am

Next

Return to General