Server action isn't appearing in Server Actions folder/dialog

I’ve created a form (in a modal) to gather information that I then want to have emailed. I’ve followed nearly all the instructions in this tutorial, up to the point where the behavior in the tutorial doesn’t match what’s happening in my project.

When I get to the instruction that reads Change the handler to DMXzone Server Connect: that’s where I’m getting tripped up. There’s no handler in recent versions (tutorial has great info, but important steps I can’t get completed are out of date), and it’s unclear whether I have to do something else to enable “connecting” to the DMXzone Server (or whatever it might be called now).

I’ve created and saved the Server Action:

I navigate to the form that has the input, in App Structure, but when I click the Select Server Action button I get a dialog with a folder inside called Server Actions and there aren’t any Server Actions to choose from.

I’ve saved the Server Action, and it reports it’s saved successfully. If I click / double-click / try to select that folder, it gives me nothing (tells me to select a Server Action, not a folder, which I would definitely like to do). Searching in that dialog produces nothing. It’s like it’s not connected to anything, or it can’t find the Server Action I already created and saved.

Any suggestions? I suspect I’m just missing some step to make it all connect, but I’ve been working on this for half a day, and I’m getting nowhere. Any help or guidance would be greatly appreciated!

You have not actually created a server action but created two steps under Global steps.
You need to click API and then add a server action.

So, remove the steps you added in Globals. Create a server action under API and add the send mail step only there, as you have already defined your mail setup unde Globals > Mailer.

Then when you make your form a server connect form, you will see your server action.

1 Like

Okay - great, that helps! I’ll go through the full process tomorrow. Much appreciated @Teodor for the guidance and the quick reply.

I had this problem too. It was a pain in the ass to figure it out, as I was thinking an API is not a server action but some kind of connection for a REST API and I would find the list of my server actions under “library”, so I tried putting everything there and then I saw nothing to select then including the server connect.

It would be better not to call it “API” but simply “Server Actions”, as this is the term used on the right hand side when selecting the Server Action.

Hi, I too made the mistake of creating steps under Global, and therefore I could not find them in the popup from ‘Select Server Action’. So I deleted the step from Global, as per the above advice, but under Database Connections or under API, the Action steps is disabled. How can I create Action steps please.
image

I think you may just confuse the system by creating a folder called api inside the existing API folder.

Try rename your api folder to something like my-actions or admin-actions or whatever describes the kind of server actions you are going to place inside that folder.

Take a look at this as a more common structure
Screenshot 2021-05-09 at 11.59.34

Hi, Thank you, your answer gives great context to how this is managed. And it worked beautifully. And you have answered another important question which is How good and timely is Wappler support? answer - excellent.

Hi, Following on from the above, the ‘Select Server Actions’ went well.

image

I have populated 2 rows in the Users table in MySQL.

The next step n the tutorial is to create a Bootstrap 4 table to display the 2 rows.

When I get to the Data Bindings for the table, there is nothing under data.

image

And I have defined a query step in ListUsers

image

How do I get the data bindings to work?

Did you save the server actions?

Only api steps that have the output option ticked will show in the data bindings.

1 Like

Hi, Yes I did not tick output, so doing that solve that question, thank you.

The Bookstrap4 table, when it displays does not display any rows. There are 2 rows in my MySQL table Users

but they do show up. The headers are pulled up correctly, but nit the rows.

I have hunted around to try to find something I have not ticked, but I cannot find it.

How do I get the data to show up please?

Well check your server action for errors first:

Hi Teodor, The latest Wappler I have is considerably differnt to the screen shots you supplied in your reply.
Yours …

Mine…

Am I in the right place? I found debug in a top level menu, (arrowed) not where you indicated, is this correct for the current version? Is there a tutorial in the current (or close) version?

The query I have is simple…
image

So what could go wrong (permissions i guess). If yuo could let me know if I am on the right track, I will pursue debugging later today.
BruceX

That looks like the correct place now if you open in browser and inspect element (open dev tools names slightly different per browser) then under network tab look for XHR you should see the actions and it will detail the error etc

1 Like

Well please follow the tutorial i sent, enabling the debug as explained there, this has not changed in any version - the procedure is the same.

Hi, I have followed thru on the debugging procedure, I will detail each step so that you can advise where I have gone wrong. Before starting I checked all permissions of the username that I am connecting to My SQL with, all privilege’s are granted for it in teh MySQL database.

With debugging switch on and saved I clicked here…

In my browser (Chrome) I got
image

In Chrome, I right click, choose Inspect, choose Network and XHR.

Then I Long-Left Click the Refresh and choose ‘Empty Cache and Hard Refresh.’

Which should show me an error message.
There is no error message.

In MySQL, I created the exact same query, it worked just fine so there are no syntax errors with qUsers in Wappler.
image

What can I do to help you help me. Is it worth me grabbing a cheap VPS and downloading Wappler there, repeating my project steps there, so that you can log in to my Wappler on the VPS and spot (probably) the simple problem I am having?

Can you please provide a link to your page where we can check this?
It looks to me your server action is either not included on the page or set to no auto load.

No Auto Load is off
image

My page is Home (marama-cloud.com)

It looks like some of your pages have errors

Are you sure you have published all the files to the server?
It looks to me that some files are missing, as they redirect to your home page, for example:

https://www.marama-cloud.com/dmxAppConnect/dmxAppConnect.js

Make sure to publish ALL the files to your remote target.