Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Classic 2.6.4 eval - Error when insert none required field (Read 7299 times) previous topic - next topic

Classic 2.6.4 eval - Error when insert none required field

I made a simple table with id (int), date field, int field and varchar field in MySql, with NULL as default option.

I changed the "validation->required" option on Add Page to "False".

Generating project with only this table without authetication, it giving error.

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column '....' at row 1
File   C:\laragon\www\v\app\models\PDODb.php On Line 459

when datetime field is required "true" we receive another error:

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column ' ... ' at row 1
File   C:\laragon\www\v\app\models\PDODb.php On Line 459

I tested in 2 pcs.

Please advice where i did wrong.

Thanks



Re: Classic 2.6.4 eval - Error when insert none required field

Reply #2
Hi Willvin..
thanks 4 ur reply..

files attched


Re: Classic 2.6.4 eval - Error when insert none required field

Reply #4
Sorry...

Files Updated.

Re: Classic 2.6.4 eval - Error when insert none required field

Reply #5
tested with the classic version 2.6.5 ... same problem remain.

Re: Classic 2.6.4 eval - Error when insert none required field

Reply #6
I made a simple table with id (int), date field, int field and varchar field in MySql, with NULL as default option.

I changed the "validation->required" option on Add Page to "False".

Generating project with only this table without authetication, it giving error.

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column '....' at row 1
File C:\laragon\www\v\app\models\PDODb.php On Line 459

when datetime field is required "true" we receive another error:

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column ' ... ' at row 1
File C:\laragon\www\v\app\models\PDODb.php On Line 459

I tested in 2 pcs.

Please advice where i did wrong.

Thanks


 
 

@grou‍ 
the project works fine from my end. Please publish your project to a different folder, that should solve it.

Re: Classic 2.6.4 eval - Error when insert none required field

Reply #7
I removed laragon and installed new version with new installation and new database.

In the table, all field expect "id" (Primary key) have default as NULL.

In the form on PHPRAD (Add form) only "id" is required... All others fields are "not required".

I made several new projects.. in both PHPRAD Vue and PHPRAD Classic.

In PHPRAD VUE, everything worked fine... no errors.
In PHPRAD Classic 2.6.5 i got errors when date or datetime or int fields left Blank with no data. Varchar field are saved blank without error. PLEASE TEST WITH BLANK DATETIME AND INT (no data) and try to save the record.

I tried in a new pc and got same error with classic version.

Please take a look on the attached screenshot.

In PHPRAD Vue everything is fine.

Please help.


Re: Classic 2.6.4 eval - Error when insert none required field

Reply #9
I made a brandnew and very simple project with one table named customers.
In this table we have id (primary key), name (required), birthdate (not required), age (not required), created_at (not required).

i am uploading the project with the database .sql again.
please if anyone else can test it and confirm the error 500 in PHPRAD CLASSIC version.
In PHPRAD VUE editon there is no errors.

First test: Use add form and just inform the name, leave all other fields empty.  I got error 500 on birthdate
Second test: Use add form again and inform name and birthdate. Leave age empty and try to save. Error 500 on age field.

Thanks


Re: Classic 2.6.4 eval - Error when insert none required field

Reply #11
Thanks Willvin for figuring out this...

Do you have any ideia of how much time usually take to resolve these issues?

We are stuck on this error. Since our form cannot have all the fields "required" at "Add Page".

Regards.


Re: Classic 2.6.4 eval - Error when insert none required field

Reply #13
the error remains even in the PHPRAD Classic 2.6.7 version....

please test my last uploaded project again.

I deleted all files in localhost and generated the project again with no success.

please confirm.

Regards.

Re: Classic 2.6.4 eval - Error when insert none required field

Reply #14
Hi Willvin...

Any news please about this bug?

Keep Waiting...

Regards