Server Status 500 - fetch.js:248

I have been using the Sever Action debug instructions to try and work out what is happening here.

I have an insert server action and BS4 form that is adding records to a MySQL db. One of the fields I have set to the default of “none” rather than null. When I load the page with the form then I am seeing the server status 500 message in the developer console and this shows it is coming from the fetch function. I have attached a screenshot.

If I change the database structure from “none” to “null” then I no longer get the server status 500 message. However I am getting records with only nulls added to the database when I backspace from one field to the previous one.

I have validation set to “required” on the field described above.

Can someone provide a suggestion please ?

Can you please check the exact error as explained here:

I have the debug in server connect enabled as per the instructions in your link.

In Wappler I see the message at the bottom of my page saying “Failed to load resource: the server responded with a status of 500 - page_name.php?:1”

In Developer Tools (Chrome), if I refresh the empty form than i see a status 500 (see screenshot). If I drill down on the fetch.js:248 link then if see the code highlighted in the fetch section of the code (see screenshot).

Each time I refresh the empty form I see the same Server 500 error.

Can you please send a link to your page?

Teodor, can I do this by private message ? I don’t know how to do this.

Click on my picture and then send a message :slight_smile:

There is an issue on your page.
You added a server connect component which auto runs the insert action on page load.

<dmx-serverconnect id="sc_add_person_record" url="/dmxConnect/api/add_person_record.php"></dmx-serverconnect>

This is wrong.

You should not add the insert server action as a separate server connect component in App Connect. It should only be used in the server connect form used to insert the record…

Teodor, many thanks again ! :grinning: