Can't populate drop down fields

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
fabiensen
Posts: 3
Joined: 2016-12-14 15:25

Can't populate drop down fields

Post by fabiensen » 2017-03-10 13:12

Hi,

for some reason, I can't get drop down fields (wich are linked to a table) populated. They are empty at the loading of the page and stuck on "searching" if I click on them. This behavoiur happens only in Linux hosting, while in Windows local machine, everything is ok.
I debugged all the code producing the call and the response, and finally I discovered through Chrome network inspector that ajax_combo.php at the very end, responses with a well formatted jSON

Code: Select all

echo json_encode(array(
			'results' => $prepared_data,
			'more' => (@db_num_rows($res) >= $results_per_page),
			'elapsed' => round(microtime(true) - $start_ts, 3)
		));
As i said before, the jSON is ok, I can see it through the console. For example, when starting searching for a record which I know it is existing i get:

Code: Select all

{"results":[{"id":"8","text":"-- Scegli il Distretto --"},{"id":"3","text":"Distretto Centro"},{"id":"2","text":"Distretto Nord Est"},{"id":"1","text":"Distretto Nord Ovest"},{"id":"6","text":"Distretto Sardegna"},{"id":"7","text":"Distretto Sicilia"},{"id":"4","text":"Distretto Sud Est"},{"id":"5","text":"Distretto Sud Ovest"}],"more":false,"elapsed":0.109}
So, I can't really understand why the select fields are not populated with these sets of data. The only thing I can tell you is that before that string I can see a small dot. Hovering it with the mouse, in the Chrome network, I see \ufeff. I tried to Google for it but with no success.
There is no error in the console of Chrome, neither a network one.

Could anybody point me to the right direction in order to debug and possibly solve this issue?

Best regards
Fabio Ricci

ebrief
Posts: 5
Joined: 2013-07-22 14:38

Re: Can't populate drop down fields

Post by ebrief » 2017-09-13 22:10

I have the same problem with drop down lists not populating from a parent table. I also found it is not a problem on my local Windows server, but it is a problem for Linux hosting. I am using the following Linux server:
Apache Version 2.4.27
PHP Version 7.0.23

Windows server is:
Apache Version 2.4.26
PHP Version 7.0.21

Please let us know when someone can figure out the work around.

Best Wishes,
Ford Shealy

ebrief
Posts: 5
Joined: 2013-07-22 14:38

Re: Can't populate drop down fields - SOLVED

Post by ebrief » 2017-09-14 17:15

If you install the iconv() and GD php modules on your webserver, it will resolve the drop down populate issue. The drop down lists will work.

Cheers,
Ford Shealy

Post Reply