Error using user-friendly searchable otpion - show_edit_form_after_error

nauriso

New member
Getting error when trying to use Field type:select_multiple_menu with user-friendly searchable enabled. Tables are not joined with PK & FK. Lookup table B contains bunch of emails (each email in one row) and want insert in table A field email_list multiple emails using select multiple menu with user-friendly approach. After clicking insert - getting such error, but record is recorded:
[pre]
PHP Notice: Undefined variable: show_edit_form_after_error in C:\inetpub\wwwroot\mydb\include\footer.php on line 177`
[/pre]
Disabling User-friendly searchable? works fine without any issue. Is this error by bad relational model design or something else?

[pre]
Choose a field - email_list (from table A)
Field type: select_multiple_menu
Content type: alphanumeric
Lookup table name: table B
Lookup table primay key field: email
Lookup table linked fields: email
User-friendly searchable - Yes
[/pre]

Thanks

[pre]
You are using DaDaBIK version 9.3-Monterosso pro, installed on 07-11-2019 (installation code: 147435d272e3dc4331), the latest version of DaDaBIK is 9.3-Monterosso released on 05-29-2019

PHP Version: 7.3.6

mysql version: 8.0.16

Web server: Microsoft-IIS/10.0

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
[/pre]
 

eugenio

Administrator
Staff member
Hello,
it sounds like a bug, it shouldn't have consequences, though.
Let me understand better the problem: you see such error in your error log, not on the screen, am I right? The insert operation works as expected and you are redirected to the results grid after insertion?

Best,
 

nauriso

New member
My steps -
1) Create New in table A
2) write down one or multiple emails using this wonderful search option
3) Press "Insert a new item"
4) then opens in the same web browser page blank web page with this error text, but record is written in database correctly
Also tested on select_single - the same error. In Edit mode this "friendly search" is working w/o any issues ( I can add, delete records in field w/o error messages. And after pressing Save+Go Back I return to web page with all records
 

eugenio

Administrator
Staff member
Ok, so you are not correctly redirected to the results grid, you are redirected to a blank page containing the error, which is not correct.
I will check this more in details. The problem, if any, is not related to the database design, you don't need to use a FK in order to set a select multiple lookup field.

Question: any modification you did to the dadabik code, apart from config.php?
 

eugenio

Administrator
Staff member
Ok, I have understood the problem, thanks for the submission. It's a (sort of) bug, it will be fixed in the next release of DaDaBIK.

Normally you don't see this message because I think the vast majority of users has this error reporting setting

E_ALL & ~E_NOTICE

you probably have (you can check in your php.ini or by using the phpinfo() function)

E_ALL

Furthermore, before the statement that produced the warning there is a redirect; maybe the way IIS handles redirects also impact on this (with E_ALL on Apache I can't reproduce your issue) , but anyway I know how to fix it.

Can you try to add this at the end of your config.php file:

error_reporting(E_ALL & ~E_NOTICE);

and tell me if the problem disappeared? This is not a fix (it remove notices, which I am not sure if it's what you want) but at least you could work.

Best,
 
Top