Page 1 of 1

Select Lookup Table - The Results Could Not Be Loaded

Posted: Sat Mar 11, 2023 11:04 am
by deedaax

I was using Select Tag in Master form in phpmaker 2023, but when I click Select Tag Field, the message "The Results Could Not Be Loaded" appears, no items appear in the Select list. There are already several records that I input.

But if I open the Select Field in Inline Add, the items in the Select list appear according to the record I entered.
Can anyone explain this problem? Thx before...


Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Sat Mar 11, 2023 12:59 pm
by arbei

It is a Select2 error message. You may enable debug and Check HTTP Response. You may post the errors in the HTTP response for discussion.


Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Mon Sep 25, 2023 9:23 pm
by rutmax

I have the same problem. It seems that the latest updates of v2024 build the two .htaccess files. I am referring to .htaccess files generated in the output folder, one placed in root and the other placed in the "api" subfolder.

Everything works again if I open the two .htaccess files and edit the "Files" tag as follows.

Original

<Files ~ "log-\d+-\d+-\d+\.log$">
Order allow,deny
Deny from all
<Files>

Modified

<Files ~ "log-\d+-\d+-\d+\.log$">
Require all granted
</Files>

Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Mon Sep 25, 2023 9:54 pm
by arbei

Your orignal setting was "Deny from all", if you set it to "Require all granted", all requests are allowed. You should use "Require all denied".


Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Mon Sep 25, 2023 11:59 pm
by rutmax

Thanks for the info, so updated suggestion is modify the two .htaccess in the following way.

Original:

<Files ~ "log-\d+-\d+-\d+\.log$">
Order allow,deny
Deny from all
<Files>

Modified:

<Files ~ "log-\d+-\d+-\d+\.log$">
Require all denied
</Files>

I am aware that you can decide not to have the .htaccess file generated using the advanced options (so my modification will not be overwritten).


Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Mon Jul 15, 2024 4:07 pm
by sonc

Same problem now.
Work fine last week.

root .htaccess was already correct with last 2024 version of PhpMaker,

<Files ~ "log-\d+-\d+-\d+\.log$">
Require all denied
</Files>

in api folder, I've added the directive because was not present.

At this time in http network debug, I have a 500 internal server error
"strict-origin-when-cross-origin" error.

Same problem when disabled "Strict-Origin-Isolation" in Chrome browser

Any idea ?
Thanks


Re: "The Results Could Not Be Loaded" - Select Lookup Table in Master Detail Form

Posted: Mon Jul 15, 2024 4:24 pm
by arbei

The "Require" directive is for the log files, it has nothing to do with the error "The Results Could Not Be Loaded", you should, arbei wrote:

You may enable debug and Check HTTP Response. You may post the errors in the HTTP response for discussion.


Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Mon Jul 15, 2024 4:44 pm
by sonc

On the left, lookup error.
No data in Response panel, Preview panel is a blank page
In header tab :

Request URL:
https://xxx/intranet/api/lookup
Request Method:
POST
Status Code:
500 Internal Server Error
Remote Address:
70.32.23.92:443
Referrer Policy:
strict-origin-when-cross-origin
Connection:
close
Content-Length:
0
Content-Type:
text/html; charset=UTF-8
Date:
Mon, 15 Jul 2024 08:40:16 GMT
Server:
Apache
Strict-Transport-Security:
max-age=63072000; includeSubDomains
X-Content-Type-Options:
nosniff
X-Frame-Options:
SAMEORIGIN
X-Powered-By:
PHP/8.2.20
Accept:
application/json, text/javascript, /; q=0.01
Accept-Encoding:
gzip, deflate, br, zstd
Accept-Language:
fr,en;q=0.9
Connection:
keep-alive
Content-Length:
247
Content-Type:
application/json
Cookie:
...
Csrf-Name:
csrf6694e06fbf8dc
Csrf-Value:
N4Sd7+fWpDstaBN+ZIN/va0Zx4O9PetPMxooRWKWzhoO5v/bhO7BDBhfdhpWt0yJlCzxs4kPj3sGKRshB6L/Lw==
Dnt:
1
Host:
tonkas.be
Origin:
https://xxx
Referer:
https://xxx/intranet/devicecontroladd
Sec-Ch-Ua:
"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Windows"
Sec-Fetch-Dest:
empty
Sec-Fetch-Mode:
cors
Sec-Fetch-Site:
same-origin
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
X-Authorization:
Bearer ...
X-Requested-With:
XMLHttpRequest


Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Mon Jul 15, 2024 5:07 pm
by arbei

You have 500 Internal Server Error. Make sure you have enabled Debug and followed the instructions so that your errors will be outputted and logged. Check server side errors in your log files also.


Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Mon Aug 12, 2024 9:56 pm
by sonc

Hello,

my personal issue, is because of the presence of a require_once "custom/mainfct.php" page in Global code server events.
(Works with previous version of PhpMaker)

Where do I put this directive so that the page is available throughout the code ?

Regards,


Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Tue Aug 13, 2024 8:55 am
by arbei

It depends on what code your mainfct.php contains and what it requires. You may post the error and your code for discussion.


Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Tue Aug 13, 2024 4:53 pm
by sonc

The goal is to write custom functions outside PHPmaker and avoid having to re generate the code anew each time a change is made.
The mainfct.php (Main Functions) page only contains functions which are called directly in PHPMaker's native functions.

Here's an example.

  • Native PHPMaker function : Row_Updated
  • My custom function : CarUpdated
    function Row_Updated($rsold, &$rsnew) {
        //echo "Row Updated"; 
        global $Page;  
        $Message = CarUpdated($rsold,$rsnew);
        $Page->setMessage($Message); 
    }
    Regards

Re: Select Lookup Table - The Results Could Not Be Loaded

Posted: Tue Aug 13, 2024 5:06 pm
by arbei

The approach works, the error depends on your code in your custom functions. You may:

  1. Enable Debug and log files,
  2. Post your actual code and actual error for discussion.