Page 1 of 2

Error with the new update version

Posted: Wed Jan 08, 2020 1:52 pm
by mariri
Hi !

I've downloaded the lastest version of NuBuilder (https://sourceforge.net/projects/nubuilder/). I did some tests by making new simple forms and when I try to save a new record, I have this error message.
I don't know why :?:

Thanks in advance !

Re: Error with the new update version

Posted: Wed Jan 08, 2020 2:14 pm
by mariri
Ok I found the solution in the post named "nuDebug errors". Sorry I didn't see that

Re: Error with the new update version

Posted: Wed Jan 08, 2020 2:16 pm
by kev1n
Hi,

This issue is known (see here: https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10189).

You can either ignore the error or fix it as shown in the other post.

@Steven: The error seems to occur if a temp table is used in the Browse SQL or if $f->browse_sql == null (see here https://forums.nubuilder.cloud/viewtopic. ... 189#p20128)

Re: Error with the new update version

Posted: Wed Jan 08, 2020 2:41 pm
by mariri
Hi !

Thanks for ur reply Kevin. I have another error with this latest version compared to the previous.
When I try to save data in a form which contains a subform with this following config, I have this error message that should not happen.The row 5 doesn't exist because of the subform config (--> add : no).

Re: Error with the new update version

Posted: Wed Jan 08, 2020 5:30 pm
by mariri
I'm so sorry but in the latest version compared to the previous, the method (added in the form's Custom Code field) $('#object_id).val(value) which sets the value attribute of the selected elements doesn't work.
I tried this following tip (it works in the previous version) :

Thanks for ur help !

Re: Error with the new update version

Posted: Wed Jan 08, 2020 8:11 pm
by kev1n
mariri wrote:I'm so sorry but in the latest version compared to the previous, the method (added in the form's Custom Code field) $('#object_id).val(value) which sets the value attribute of the selected elements doesn't work.
I tried this following tip (it works in the previous version) :

Thanks for ur help !
This still works for me. Does the display object show the number that is returned by the SQL?


PS: Please make sure to only ask one question per topic. That way you don't discourage people that only know the answer to one of your questions from helping you. And it allows other people with a similar problem to find the answer more easily.

Re: Error with the new update version

Posted: Wed Jan 08, 2020 10:31 pm
by kev1n
mariri wrote: When I try to save data in a form which contains a subform with this following config, I have this error message that should not happen.The row 5 doesn't exist because of the subform config (--> add : no).
I can reproduce that. It's apparently a bug...


@Steven: The function nuValidateSubforms() needs fixing so that the error "cannot be left blank" will not be displayed if addable & deleteable are set to true.

Re: Error with the new update version

Posted: Thu Jan 09, 2020 9:44 am
by mariri
kev1n wrote:
mariri wrote:I'm so sorry but in the latest version compared to the previous, the method (added in the form's Custom Code field) $('#object_id).val(value) which sets the value attribute of the selected elements doesn't work.
I tried this following tip (it works in the previous version) :

Thanks for ur help !
This still works for me. Does the display object show the number that is returned by the SQL?


PS: Please make sure to only ask one question per topic. That way you don't discourage people that only know the answer to one of your questions from helping you. And it allows other people with a similar problem to find the answer more easily.
Ok sorry about that...

Yes, the display object shows the number that is returned by the SQL. I didn't change anything between the two versions

Re: Error with the new update version

Posted: Thu Jan 09, 2020 7:15 pm
by kev1n
mariri wrote: Yes, the display object shows the number that is returned by the SQL. I didn't change anything between the two versions
In the current version, you need to set a button's text with html(..) instead of val(..)

Code: Select all

if (nuFormType() == 'edit') {
    $('#sample_test_button').html($('#sample_test_button').html() + ' (' + $('#sample_display').val() + ')');
}

Re: Error with the new update version

Posted: Fri Jan 10, 2020 8:46 am
by mariri
Ok it works ! Thanks so much :mrgreen: