Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Cannot add new records in the application

Questions related to installing, updating, setting up and configuring
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Cannot add new records in the application

Unread post by totoro »

So, after moving my nuBuilder application from MariaDB 5 to MariaDB 10 on a Synology NAS, as described in another topic on this forum, I'm now having one problem. When I try to add a new record, I fill out the fields, then I click Save... all fields get cleared and no new record appears in the database.
I've tried adding a new record manually to the table under the user which nuBuilder is configured to connect to the database. I've succeeded. What's more, the new record is listed by nuBuilder itself and works the same as all other records in that table.
Changing existing records works fine, the problem so far appears to be with adding records only.
How do I go on debugging this problem?
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Cannot add new records in the application

Unread post by kev1n »

Does this happen in any form? Also e.g. when addin a new user, access level etc?
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Re: Cannot add new records in the application

Unread post by totoro »

I was able to add an access level and a user successfully right after the move to MariaDB 10, so those forms are working fine.
Hmm, since after the upgrade nuBuilder did not see users created before the upgrade and I had to recreate them, perhaps some similar problem occurs with the form? Perhaps I should recreate it too, although it does seem a bit inconvenient.
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Re: Cannot add new records in the application

Unread post by totoro »

Well, I decided to start from scratch so I've removed all nuBuilder tables from the database and recreated access levels, users and forms anew. Unfortunately, the problem did not go away. I fill out the fields of the edit form, click Save - and all the fields become clear again and no new record appears in the table.
So, where do I start?
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Cannot add new records in the application

Unread post by kev1n »

Could you upload a dump of your db here?
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Re: Cannot add new records in the application

Unread post by totoro »

Yes, here we go.
Attachments
films.zip
(261.42 KiB) Downloaded 120 times
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Cannot add new records in the application

Unread post by kev1n »

The table name is lowercase (films and not Films)
Attachments
2021-08-23_105409.png
2021-08-23_105409.png (10.9 KiB) Viewed 1662 times
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Re: Cannot add new records in the application

Unread post by totoro »

The table name is specified in uppercase exactly like it is in the database:
tables.png
tables.png (383.13 KiB) Viewed 1657 times
And in fact that is what Form Builder offered when I used it to create the Fast Form.

Is there something wrong with that?
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Cannot add new records in the application

Unread post by kev1n »

There's nothing wrong with capital letters. The tables were converted to lowercase when I imported the SQL (it's just a XAMPP setting)
But saving works fine for me:
saving.png
saving.png (11.82 KiB) Viewed 1656 times
How can I replicate your issue? What values do I have to enter so that saving fails?
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

Re: Cannot add new records in the application

Unread post by totoro »

Well, for me it does not work with any values. I've just tried with ones from your screenshot and the symptoms are the same: the fields get cleared when I press Save and nothing is added to the table. At the same time saving changes to an existing record still works. So I'm not sure what could be done to reproduce it because I don't do anything specific to make the problem appear.
Maybe I could stuff the code with debug printouts to understand what goes on in there?
Post Reply