serverconnectForm.js:262 404 NOT FOUND`

Hello,

I went through the video to update a form. I went through it twice on two different pages with the same result.

https://wapplerunwrapped.online/videoplayer.php?id=16

I am unable to save updates as I get a 404 error on the serverconnectForm. The line 262 in question is
try { this.xhr.send(data); }
I have read a few other posts on this error.

I am a little confused as I can inspect the file in Chrome, but yet the path says it is in dmxAppConnect/maps/components and I do not see a components folder created. Is the bootstrap form generator not creating all the appropriate files on my system? I appreciate the thoughts.

Thank you,

Hello, are you not able to see the exact error in the Network/XHR tab as explained here:

I saw those steps earlier as well and didn’t see much. Here is what I see. I set server debug as well in Wappler. Not sure where those results end up.

Seems to me some input name or the form name is causing this. Can you post your form code here please, wrapped in three backticks ``` (not single quotes, but backticks!) so i can inspect it?

So I built a new simple table along with two pages. One to query the table and then link to an edit page. It worked flawlessly. So I am thinking it might be something unique to this table or data in the database. I will also rebuild the page in its entirety as well. Here is the body in the page if still interested. At least I was able to go through the process on another page and see it working so I will keep poking around to see what’s up with this particular page.

<body is="dmx-app" id="editAlerts">
    <dmx-query-manager id="query1"></dmx-query-manager>
    <dmx-serverconnect id="serverconnect1" url="dmxConnect/api/queryAlertsById.php" dmx-param:id="query.id"></dmx-serverconnect>
    <div class="container">
        <div class="row">
            <div class="col">
                <form is="dmx-serverconnect-form" id="serverconnectform1" method="post" action="dmxConnect/api/updateAlertsById.php" dmx-generator="bootstrap4" dmx-form-type="horizontal" dmx-populate="serverconnect1.data.queryAlertsById">
                    <div class="form-group row">
                        <label for="inp_id" class="col-sm-2 col-form-label">Id</label>
                        <div class="col-sm-10">
                            <input type="number" class="form-control" id="inp_id" name="id" dmx-bind:value="serverconnect1.data.queryAlertsById[0].id" aria-describedby="inp_id_help" placeholder="Enter Id">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_submittedDate" class="col-sm-2 col-form-label">Submitted date</label>
                        <div class="col-sm-10">
                            <input type="date" class="form-control" id="inp_submittedDate" name="submittedDate" dmx-bind:value="serverconnect1.data.queryAlertsById[0].submittedDate" aria-describedby="inp_submittedDate_help"
                                placeholder="Enter Submitted date">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_symbol" class="col-sm-2 col-form-label">Symbol</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="inp_symbol" name="symbol" dmx-bind:value="serverconnect1.data.queryAlertsById[0].symbol" aria-describedby="inp_symbol_help" placeholder="Enter Symbol">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_action" class="col-sm-2 col-form-label">Action</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="inp_action" name="action" dmx-bind:value="serverconnect1.data.queryAlertsById[0].action" aria-describedby="inp_action_help" placeholder="Enter Action">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_targetPrice" class="col-sm-2 col-form-label">Target price</label>
                        <div class="col-sm-10">
                            <input type="number" class="form-control" id="inp_targetPrice" name="targetPrice" dmx-bind:value="serverconnect1.data.queryAlertsById[0].targetPrice" aria-describedby="inp_targetPrice_help"
                                placeholder="Enter Target price">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_latestPrice" class="col-sm-2 col-form-label">Latest price</label>
                        <div class="col-sm-10">
                            <input type="number" class="form-control" id="inp_latestPrice" name="latestPrice" dmx-bind:value="serverconnect1.data.queryAlertsById[0].latestPrice" aria-describedby="inp_latestPrice_help"
                                placeholder="Enter Latest price">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_status" class="col-sm-2 col-form-label">Status</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="inp_status" name="status" dmx-bind:value="serverconnect1.data.queryAlertsById[0].status" aria-describedby="inp_status_help" placeholder="Enter Status">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="inp_triggeredDate" class="col-sm-2 col-form-label">Triggered date</label>
                        <div class="col-sm-10">
                            <input type="date" class="form-control" id="inp_triggeredDate" name="triggeredDate" dmx-bind:value="serverconnect1.data.queryAlertsById[0].triggeredDate" aria-describedby="inp_triggeredDate_help"
                                placeholder="Enter Triggered date">
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-sm-2">&nbsp;</div>
                        <div class="col-sm-10">
                            <button type="submit" class="btn btn-primary" dmx-bind:value="serverconnect1.data.queryAlertsById[0].Save">Save</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="bootstrap/4/js/popper.min.js"></script>
    <script src="bootstrap/4/js/bootstrap.min.js"></script>
</body>
1 Like

As I suspected the issue is caused by an input name (name="action"). Please check the following topic explaining what’s wrong:

1 Like

Ahh, having a field in the database named “action” was the culprit. I removed that field from the update query and table. Low and behold, it worked like a champ. Thank you very much!