Issues with url split

Hello I am making good progress on the wappler course but I’ve run into another error. I am on this video https://www.youtube.com/watch?v=Mx9dcR7Hp6I&list=PLUjqTJN3byC9W9UFjsV9f9vefe_ZSFQfb&index=28&ab_channel=Wappler and having troubles with getting rid of the api action entry. I went back and checked everything. Everything is running smoothly until I add the urlsplit condition and the urlsplit!=‘api’
My home page suddenly stops loading and I get a white screen with all of this text on it. Do you know the issue here? I included the error home page screen along with screenshots of the api table.

One way I use to debug and understand whats happening Before the condition add two SET Variables, in each one submit the value of the condition parameters and output them.

I will debut like this:

1- Set Value action with urlsplit output this

2- Set Value action with api output this

And disable temporally the condition.

Run the api and you will see what are the two values you will compare and start looking if the values that you are comparing are the good ones.

Thats what I start doing after get stuck in a step.

OTHER GOOD ONE

Restart local server and test it all.

Okay I think I did this correctly. I made two set values and checked output on both of them. I think I typed the right actions. I also disabled the current api key. The home page is loading again however nothing is being recorded onto my SEO table now. I also stopped my local server and then started it up again. Still unsure of the issue. Here are photos of what I did:

The expression in the condition step looks incorrect.

To get a value from the 2nd index of urlsplit expression in the step before, change the expression for condition from urlsplit(1)!='api' to urlsplit[1]!='api'.

2 Likes

You are correct. I just fixed it and it is now working. Beautiful! thank you

1 Like