Struggling to Successfully Test My Form - Tutorial

Hello!

I’m very new to Wappler (and no code in general) and am following along with the youtube tutorials by @Hyperbytes (which is awesome :slight_smile: ) but I’m hitting a snag. I’m on my 3rd round through the tutorial trying to see what I missed, but when I made it to video 10, I ran into an issue when testing my form ( Finalising you registration form. (IMPORTANT See note below regarding Password issue) - YouTube)

When I click the submit button, I keep getting the “Oops! An Error Occurred” notification that i set up

After going through the previous videos over again and rebuilding three times, the only thing I can see on my end that is different is on the workflows screen under execute:

instead of seeing a longer text string like i’m seeing at 3:30 in Creating your first API action - The registration process. - YouTube

I’m seeing Value (?,?,?,?).

I feel like this is is something obvious that i’m not catching. ANY advice or help in troubleshooting this is greatly appreciated!

Thanks!

Hi Michael,

Welcome to the Wappler community!

That’s correct. In the newer versions, Wappler is hiding the actual POST variables. My understanding is that this is to stop execution of any malicious SQL code injection. You will see the similar SQL query syntax with the conditions.

Have you checked dev console in the browser for any errors?

2 Likes

Then you need to debug this:

1 Like

Thank you, @guptast! Did not realize that, but thank you for the helpful explanation! Makes sense.

I had not yet, but doing a debug based on the instructions below. Will post results shortly

Thank you for the instructions, @Teodor! This helped a lot - will post results of debug shortly

Ok, thanks again for the help! Here are the results of the Debug: found the error message.

  1. {status: “500”, code: “SQLITE_ERROR”,…}

  2. code: “SQLITE_ERROR”

  3. message: “insert into User (Email, First_Name, Last_Name, Password) values (‘Mike@test.com’, ‘Michael’, ‘Stubbs’, ‘12345678’) returning User_id - SQLITE_ERROR: no such table: User”

  4. stack: “Error: insert into User (Email, First_Name, Last_Name, Password) values (‘Mike@test.com’, ‘Michael’, ‘Stubbs’, ‘12345678’) returning User_id - SQLITE_ERROR: no such table: User”

  5. status: “500”

It’s on the register page:

I’m hunting around on other posts now to see how to resolve, but any additional advice to point me in the right direction is greatly appreciated. If I can provide additional screenshots of specifics, please let me know. At first glance it doesn’t seem to be anything glaring such as the table missing, but it is worth noting that I previously had to delete and re-create the table once before (as part of troubleshooting) . I saved and refreshed everything and redid the execute actions as well afterwards, so I don’t believe it is from that.

The error you’re getting seems similar to an error posted in another post.

1 Like

Solved! Thank you, Guptast! I tried working through the solutions in the steps above and I think that was part of the problem. The action still wouldn’t work for me. However, I updated Wappler to version 6.0 and my project had all kinds of errors… so, at midnight lol, I decided to start over and rebuilt the whole thing. Third time’s the charm. :slight_smile: I never fully figured out the root of the main issue, however I believe the db folder being saved in the incorrect location played a part. When I re-created the project, I saved in the app folder. I also seemed to have some capitalization issues in the form itself when naming the password and email fields of the form (i had updated these from “email” and “password” to"Email" and “Password”. No idea if that has an actual impact, but it seemed to from my testing and was repeatable.

TLDR: problem solved, updated wappler, rebuilt from scratch saving the database file in the app folder from the get-go instead of trying to move later. Thanks all for the help!

1 Like

Glad to hear that the project is working correctly after re-creating it :slight_smile:

The capitalisation of field names in the form would have definitely been one of the issues. If the server action is expecting $_POST.email and the form is submitting $_POST.Email as a post variable, then the API is going to return an error due to a mismatch between the POST variable names.

1 Like

Good to know - makes total sense. Thank you again for the help!!

1 Like