Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Errors opening forms with IFRAME and GRID

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Errors opening forms with IFRAME and GRID

Unread post by kknm »

When opening the main form, the
errors like this:

Code: Select all

[0] : ===PDO MESSAGE===
SQLSTATE[HY000]: General error: 1525 Incorrect DATE value: '-1'
===SQL===========
SELECT `jur_wid`  FROM     jur_works WHERE (`jur_data` = '-1')  AND (1)  ORDER BY     jur_data DESC
===BACK TRACE====
/var/www/kknmkomp/core/nuform.php - line 1030 (nuRunQuery)
/var/www/kknmkomp/core/nuform.php - line 397 (nuGetSubformRecords)
/var/www/kknmkomp/core/nuapi.php - line 92 (nuGetFormObject)
In this case, the jur_works table is used as a source for the form of the 1st subform (Iframe) and the 1st subform (Grid) with the code:

Code: Select all

SELECT
 jur_works.*
FROM
    jur_works
WHERE
    (jur_dep ='#fltr#')
ORDER BY
    jur_data DESC
But if you open browse-form jur_works separately and independently, the same SQL does not show any errors.In the database and nuBuilder, the 'jur_data' field is declared as Date.`jur_wid`- this is the primary key.

I can’t say that this appeared after the Ubuntu update, because... the form worked correctly, but after updating on the subform (Grid), the Select field stopped working, showing an empty field. As a result, I went into nuDebug and discovered the above errors. When organizing the Select field (with the same SQL query) on any other form, this field correctly makes the selection.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

Is it possible to upload a dump of that form and the relevant tables?
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

https://cloud.mail.ru/public/gDzG/mhyF2gwpX
Not all subforms are in the archive, there should be 7 pieces.
By the way, in the 'sub_jurw_if' subform, the 'jur_work' field was temporarily changed to 'Lookup' instead of the problematic SELECT field.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

I have created a new "test" DB and imported your SQL files. Now I am getting some errors when I open forms (e.g. jurp_clone_1)
Please create a complete example that I can test immediately on my end.
test.zip
You do not have the required permissions to view the files attached to this post.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

To demonstrate the error, I made a full dump of my database and deleted sensitive data that does not affect operation.
https://cloud.mail.ru/public/xAmp/5GGwKPLQL
Kevin let me know when you receive the file so that it can be deleted from the cloud - for my peace of mind :-).
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

Files downloaded. I will look at them a bit later.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

Ok.
Thank you in advance for your concern!
If possible, look at the main form in the F12 console for a lot of errors - I cannot determine their origin.My browser is slimjet.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

The form jurw calls a function iniFrame() which is not defined:

Code: Select all

if (iniFrame()) {
    function nuSelectBrowse() {
       return false;
    }
    $('#nuActionHolder').remove();
}
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

This is a very old function that I used - now it is not needed, it seems to me. Before the update, the SELECT fields worked and this does not affect. current errors.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

I don't see a FK for sub_jurw_if:
sub_jurw_if.png
Only when I clear the form field and select this form again does the FK drop-down contain values.
Which one is the FK?
You do not have the required permissions to view the files attached to this post.
Post Reply