Tested with PHP v5.4 after all long array and compound php statement fixes. Others can test with later versions of PHP too.
A comparison between the v4.5 Commit 285 and the v4.5 released in Sourceforge on 2021-01-16 shows no difference.
A comparison between v4.0 with all fixes that works and the v4.5 shows a lot of differences even after suppressing all whitespace and blank line differences.
To study and rectify the non functionality, the attachments are provided. Comparison in a tool like WinMerge would aid in the study of differences.
The use of the !== operator in JS is acceptable.
The object of investigation is the JS code of the nuobject record in the zzzzsys_form table.Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
[Fixed] Subform broken in v4.5
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
[Fixed] Subform broken in v4.5
You do not have the required permissions to view the files attached to this post.
Last edited by apmuthu on Mon Jan 18, 2021 1:14 pm, edited 1 time in total.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Subform broken in v4.5
The title is misleading, it's just the Scroll List that is broken.
Check Discord, this was fixed after you had reported there.
Check Discord, this was fixed after you had reported there.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Subform broken in v4.5
Since the last commit to v4.5 was #285 and the fix was not there, I thought you missed it. Will check dev/discord, test and revert.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Subform broken in v4.5
After #285 commit, the following will need to be executed in the DB:
and the nubuilder4.sql populated accordingly.
Direct lookup seems to work now.
Make sure that the following present:
Code: Select all
INSERT INTO `zzzzsys_php` (`zzzzsys_php_id`, `sph_code`, `sph_description`, `sph_group`, `sph_php`, `sph_run`, `sph_zzzzsys_form_id`, `sph_system`, `sph_global`, `sph_hide`) VALUES
('nu5bad6cb32dcbcb4_AB', 'nu5bad6cb32dcbcb4_AB', 'System PHP', 'nubuilder', '\n$s = \"\n SELECT * \n FROM zzzzsys_form\n WHERE zzzzsys_form_id = \'#LOOKUP_RECORD_ID#\'\n \n \";\n\n$t = nuRunQuery($s);\n$r = db_fetch_object($t);\n\nnuSetFormValue(\'sob_lookup_table\', $r->sfo_table);\n', NULL, NULL, '1', '0', NULL),
('nu5bad6cb32c9102c_AB', 'nu5bad6cb32c9102c_AB', 'System PHP', 'nubuilder', '$s = \"\n SELECT * \n FROM zzzzsys_form\n WHERE zzzzsys_form_id = \'#LOOKUP_RECORD_ID#\'\n \n \";\n\n$t = nuRunQuery($s);\n$c = db_num_rows($t);\nif ($c == 1) {$r = db_fetch_object($t); }\n\n\nnuSetFormValue(\'sob_subform_table\', $c == 1 ? $r->sfo_table: \'\');', '', '', '1', '0', '');
Make sure that the following present:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: [Fixed] Subform broken in v4.5
It now stands fixed and works for subform lookups too.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: [Fixed] Subform broken in v4.5
For those who have downloaded and used v4.5 released on 2021-01-16, the SQL stated in this post should be run and for new installations using it, the said sql should be appended to / included in nubuilder4.sql.