Confusing: Wappler always loads different server api

Hi!!
SHORT QUESTION: :white_check_mark:
Whenever I run “JustTestingSomethingLIVEQuestion-Get.php”, it’s supposed to pull data from the api file “LIVEQuestion-Getter2.php”.

It works, but it also pulls data from “GetNonArchivedQuestions.php” and I can’t figure out why.
I don’t even reference it anywhere in this file. That API file is for a different page in my project.

Any idea why?

:warning: MORE DETAILS: :warning:

I noticed that a php website I wrote in Wappler was loading way more data than it should’ve.
The site works as a communication device for public speakers to display questions. So, it checks the database every few seconds.

On the “Controller” site, it displays ALL the questions to the presenter.
On the “Public” site, it only displays the question being answered (the presenter clicks on it on his device).

But, I noticed that behind the scenes the Public page was pulling the entire database, by hitting a file called GetNonArchivedQuestions.php (an API file I made in Wappler) every time it checked.

I can find NO reference to that file in the programming for the public site.

So, I made a NEW api file and a NEW php file.
This is the code in the PHP file:

    <!doctype html>
    <html>

    <head>
    <script src="dmxAppConnect/dmxAppConnect.js"></script>
    <meta charset="UTF-8">
    <title>Untitled Document</title>

    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="bootstrap/5/css/bootstrap.min.css" />
    </head>

    <body is="dmx-app" id="JustTestingSomethingLIVEQuestionGet">
    <dmx-serverconnect id="serverconnect1" url="dmxConnect/api/LIVEQuestion-Getter2.php"></dmx-serverconnect>
    <main>
        <p dmx-html="">A nice paragraph</p>
    </main>
    <script src="bootstrap/5/js/bootstrap.bundle.min.js"></script>
    </body>

    </html>

LIVEQuestion-Getter2.php is the NEW API file I made that gets the data I need from the MySQL database.
But when I load this file and F12… you’ll see it’s loading GetNonArchivedQuestions.php. I have NO IDEA why.

Community Page
Last updated: