imported the form using globals to ensure I get the correct parameters.
Database Insert action using encryption for the password and making sure the form post parameters are all as per those that where imported.
and then saved it. All working fine, connecting to the DB.
Then on the app connect side, I have converted the form to server connect and selected the correct ‘register_user’ server action.
I’ve added a couple of on success actions such as a notification and also a redirect.
I then push to dev on Heroku, and also test on my local machine - the form just doesn’t send data to the DB. I’m at a bit of a loss, I’ve read all information in documentation and read through the forum - there is very little regarding this, I’m assuming as I’m just missing something super simple.
And also, take a look at the call from the client to back end.
Here's an example. Go to the network tab, and find the server connect item (I usually filter by XHR). Then click on it to see the preview (for the error) and the Headers (to see what is actually being sent.
Thanks Ken, I’ve followed the steps and this is the return. Looks like something to do with the standard increment ID field? I have not touched than, and just left it with increment. Do you see that as the same issue?
{status: “500”, code: “22001”,…}
code: “22001”
message: “insert into “users” (“created_at_”, “email”, “firstName”, “lastName”, “modified_at_”, “password”) values ($1, $2, $3, $4, $5, $6) returning “id” - value too long for type character varying(125)”
stack: “error: insert into “users” (“created_at_”, “email”, “firstName”, “lastName”, “modified_at_”, “password”) values ($1, $2, $3, $4, $5, $6) returning “id” - value too long for type character varying(125)↵ at Parser.parseErrorMessage (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/pg-protocol/dist/parser.js:278:15)↵ at Parser.handlePacket (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/pg-protocol/dist/parser.js:126:29)↵ at Parser.parse (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/pg-protocol/dist/parser.js:39:38)↵ at TLSSocket. (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/pg-protocol/dist/index.js:8:42)↵ at TLSSocket.emit (events.js:315:20)↵ at addChunk (_stream_readable.js:302:12)↵ at readableAddChunk (_stream_readable.js:278:9)↵ at TLSSocket.Readable.push (_stream_readable.js:217:10)↵ at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)”
status: “500”
I’ve gone back through and put validations on each field related to the length, but as I was only testing there was very little data going into the fields, so it shouldn’t have been that.
I must be doing something basic wrong, I’ve just loaded another page that has a form (my plan was to test a different form) - and these errors displayed regarding two server connects I’ve setup.
The DB is connected and pulls in the schema (noting something odd is happening, I can’t seem to update timestamp fields).
This fixed it!! thank you. Now getting a 200 on the submit. I reduced the hashing to a lower count. What’s weird now however, is that I’m not able to execute any server connect success actions - in the console there are no properties displayed as sent and no response either (just curly brackets for both) - which I assume there needs to be a response for the app to know to do X.
Thank you - I thought that might have been the case just didn’t expect the error within Wappler itself, as it’ll always throw that error if this is the case.