Page 1 of 2

Errors opening forms with IFRAME and GRID

Posted: Fri May 24, 2024 11:05 am
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.

Re: Errors opening forms with IFRAME and GRID

Posted: Fri May 24, 2024 11:18 am
by kev1n
Is it possible to upload a dump of that form and the relevant tables?

Re: Errors opening forms with IFRAME and GRID

Posted: Fri May 24, 2024 12:05 pm
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.

Re: Errors opening forms with IFRAME and GRID

Posted: Fri May 24, 2024 1:52 pm
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

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 2:24 pm
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 :-).

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 2:29 pm
by kev1n
Files downloaded. I will look at them a bit later.

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 2:40 pm
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.

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 3:10 pm
by kev1n
The form jurw calls a function iniFrame() which is not defined:

Code: Select all

if (iniFrame()) {
    function nuSelectBrowse() {
       return false;
    }
    $('#nuActionHolder').remove();
}

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 4:12 pm
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.

Re: Errors opening forms with IFRAME and GRID

Posted: Sat May 25, 2024 4:29 pm
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?