I have a problem with a site created years ago with Wappler, who now suddenly creates a problem (status of 500)
By making the debug of the insertion and updating pages of the records of a table, the error is generated by “Invalid Date Format”
Thinking was a server problem, I contacted assistance and they replied that they changed the database from MySQL to Mariadb
For this project, however, Wappler does not allow me to vary the connection in Mariadb
In the pages of the site, the dates in the database are read correctly; The problem occurs only during the insertion or update of a record
Where do I have to intervene to avoid this problem?
So what is your database field type (date, datetime)?
What is the date (what format) you are sending to it?
What is the EXACT error message returned by the server action, it’s not visitble on your screenshot.
It’s explained how to see it here:
the error message mentions a column IDFinanza which you are sending an empty string to '', when it seems to be an integer field, which does not allow empty values.
Hi Teodor
Maybe I understand where the problem is
From time to time the error message indicates an error for a field with different drop -down menu (idfinance … etc …)
I therefore discovered it is for the fact that the drop -down menus, before the database change from MySQL to Mariadb, also accepted a choice, while now they all require at least one choice
I don’t understand why since these fields include Null
I don’t know how to report these fields to normal
Do I have to intervene on the database or on the insertion page?
Thanks for your assistance
The problem is that
If I choose an option for all fields with a drop -down menu, the insertion and update of records works correctly
But I would like it to be as before to leave the possibility of not choosing anything.
Sorry Teodor
Following your suggestion I changed the fields that can also be null in the insertion action of new record
Now the insertion works correctly.
Ok in fact I did nonsense, even if in the case of insertion it works the same
But do I also have to correct in the case of updating?
I think it is not necessary if the field is already null or chosen
The insertion now works and as an example the idmotor field = null
I remember it is a numerical field
If I try to update the record if the Idmotore field is null (and must remain null) the update from error
I have tried several times to modify the IDMotore value in the update action as for the Insert action, but it gives me an error
{{$_POST.IDMotore.default(null)}}
Strangely, if I then go back to the action update / database options file, I see that the change has been canceled and the value has returned to {{$_POST.IDMotore}}
Hi Teodor
Unfortunately I can’t solve the problem for an apparent Wappler anomaly
I have two actions; “auto_insert” and “auto_update”
1-
In the “auto_insert” action I was able to change the value of the numerical fields that must accept a Null result
And in fact now the insertion page works correctly
2-
In the “auto_update” action instead I modify the values and save
But when the action reopen the changes have disappeared
I have tried several times and always presents this problem