Lookup Field not working

Lookup Field not working (Version 2025.9). All of sudden the Lookup Field(s) does not work. I receive and empty Dop down and once clicked on the error message reads "The results cannot be loaded). This is for SUPER ADMIN user - also tried it with other users. Does any person maybe have an solution on similar experience please?

I cannot reproduce. You may enable Debug and check the logs for errors. Post the log the discussion.

POST https://my.domain/ea_users/api/lookup?q=&n=100&rnd=107040&start=-1 401 (Unauthorized)
send @ jquery.min.js?v=25.9.7:2
ajax @ jquery.min.js?v=25.9.7:2
t.ajax @ 0:1285
transport @ 0:4032
o @ ..\..\..\..\template\aspnet2023\jquery\select2.full.js:3743
...

Failed to load resource: the server responded with a status of 401 ()

You got 401 (Unauthorized), which will not happen with Super Admin (who has all permissions). You better try again as follows:

  1. Delete all files from your site, including the cache folder (e.g. log/cache)
  2. Delete all cookes for the site,
  3. Generate all files from your project and upload the files again.
  4. Make sure you login as the Super Admin (hard coded admin). Make sure you do not have a user in the users table who has the same login name as the super admin, otherwise the database user (without all permissions) will be loaded first.

The problem was resolved by adding the following to the .htaccess file on the server for authorisations. This is a very common fix for hosting setups where Apache does not automatically pass Authorization headers to PHP or apps like WordPress, Laravel, etc.

RewriteCond %{HTTP:Authorization} ^(.*)

RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
1 Like

Thank you for this.

I got the same issue on my production server, whereas the issue does not happen on my localhost environment.

After adding that code into the .htaccess file, the issue resolved.

/api/lookup?q=&n=100&rnd=181541&start=-1:1

       Failed to load resource: the server responded with a status of 504 ()

i have this problem is there any one can help please

  1. Make sure you have set up URL Rewrite for your web site properly.
  2. Enable Debug to check the detailed error messageg.

The dropdown wasn’t working because debug mode was enabled in PHPMaker’s configuration. After disabling it in config.development.php or config.production.php, everything worked normally.

Solution:

  1. Open your PHPMaker project settings.
  2. Disable debug mode (set "DEBUG" => false,).

That probably meant the lookup output contains some error message so the JSON format was broken, You better check HTTP response and the log file to find the error and fix it.