Page 1 of 1

FastForm DB not created when many fields are added

Posted: Mon Oct 18, 2021 9:53 am
by MrFast
Hi Guys,

When I create a new form with Fast Form the table is not created - Form Type Browse and Edit, 19 Text fields, 3 Select fields and one Textarea. Due to the missing table records cannot be added.
Doing exactly the same with only 1 text field and 1 select field, no problem. Table is created and records can be added.
In both cases, after clicking on the Build Fast Form button, the message "A Table and Form has been created!".

I am using DB version V.4.5-2021.09.27.00 and files version V.4.5-2021.09.27.02.

Any ideas?

Cheers,
AJ

Re: FastForm DB not created when many fields are added

Posted: Mon Oct 18, 2021 9:56 am
by kev1n
Hi,

Open the nuDebug results (CTRL+SHIFT+D) and check your (Apache) error logs.

Re: FastForm DB not created when many fields are added

Posted: Mon Oct 18, 2021 10:37 am
by MrFast
Hi Kevin,

Thank you for your reply.

The error is: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

Can you please elaborate further on what's too long? I don't get it (yet).

Cheers,
AJ

Re: FastForm DB not created when many fields are added

Posted: Mon Oct 18, 2021 10:48 am
by kev1n
Apparently, there is a total column size limit for a table.
This might also be depending on the used DB engine and/or settings.

A quick fix would be to edit nubuilders.php in the /core folder and edit this line:

https://github.com/nuBuilder/nuBuilder- ... s.php#L421

Replace 1000 with 100 and create the Fast Form again.
This means all VARCHAR(1000) columns are going to be created with VARCHAR(100). For most input objects, this should suffice. You can always manually increase the column size once the table has been created.

Re: FastForm DB not created when many fields are added

Posted: Mon Oct 18, 2021 11:50 am
by MrFast
Great that was the solution! :-)

Thank you for helping.