Trying to get page data based on id passed as an URL parameter

Hi all,

Getting somewhere but this keeps coming back to bite me.

I have this working if I put a static ID into the input parameter on the server connect, but I can’t for the life of my get it to pull the id dynamically from the URL.

I’ve followed, refollowed and refollowed again the tutorials:


If I manually type in the id into my input parameters e.g.:
Screen Shot 2020-07-13 at 3.09.40 pm

I get the desired outcome.

If I try to do it dynamically as per the guides as follows:
Screen Shot 2020-07-13 at 3.10.46 pm

I get this 500 error:
{“status”:“500”,“message”:“Undefined binding(s) detected when compiling SELECT. Undefined column(s): [pitch.id] query: select “id”, “lead_form”, “pitch_name”, “pitch_url”, “pitch_views”, “resources”, “pricing_offer”, “pricing_text”, “video_youtube_id”, “description” from “pitch” where “pitch”.“id” = ?”,“stack”:“Error: Undefined binding(s) detected when compiling SELECT. Undefined column(s): [pitch.id] query: select “id”, “lead_form”, “pitch_name”, “pitch_url”, “pitch_views”, “resources”, “pricing_offer”, “pricing_text”, “video_youtube_id”, “description” from “pitch” where “pitch”.“id” = ?\n at QueryCompiler_PG.toSQL (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/knex/lib/query/compiler.js:99:13)\n at Builder.toSQL (/Users/Matt/Documents/Wappler/pitchflare_new/node_modules/knex/lib/query/builder.js:72:44)\n at /Users/Matt/Documents/Wappler/pitchflare_new/node_modules/knex/lib/runner.js:31:36\n at /Users/Matt/Documents/Wappler/pitchflare_new/node_modules/knex/lib/runner.js:260:24\n at processTicksAndRejections (internal/process/task_queues.js:97:5)\n at async App._exec (/Users/Matt/Documents/Wappler/pitchflare_new/lib/core/app.js:224:30)\n at async App._exec (/Users/Matt/Documents/Wappler/pitchflare_new/lib/core/app.js:206:17)\n at async App.exec (/Users/Matt/Documents/Wappler/pitchflare_new/lib/core/app.js:177:9)\n at async App.define (/Users/Matt/Documents/Wappler/pitchflare_new/lib/core/app.js:160:9)”}

Any advice, as always appreciated!!

Matt

Have you added the variable in the Query Manager as per

Hi @ben thanks for replying.

I have indeed added that, too.

Screen Shot 2020-07-13 at 4.29.01 pm

I think that there may be a bug (reported by me) that is stopping you from applying the method as described by you. Not sure though.

What I have done as a workaround, which may work for you, is to use the Browser pathparts[1] functionality instead of the Query Params.

image

This works well here:
https://fumantology.com/videos/23

See line #121

Thanks @ben - can you share a little about how you setup the workaround?

This is crazy.

All I want to do is pass data from one page (a list of items) to another (full details) - and for this to perhaps not be working due to a bug, and no team to fix it for a week or so… I literally can’t move the project forward. This and no apparent way to implement storage into Heroku/DigitalOcean for users to simply upload an avatar - looks like this time has been a wasted, and I’ll just have to persist with Bubble.

Sorry you feel that way. If you still want more info on the workaround, please let me know.

I am wondering why you have chosen for Heroku/DigitalOcean; I use a regular web server and have no problems.

I honestly don’t know why Wappler even supports Heroku as a possible host. Spend five bucks a month and get a real hosting provider in my opinion.

I chose Heroku out of simplicity really.

My preference is AWS but without the ability to upload files I can’t see how that’s an option either!

I might short term sole the uploads issue with an alternative host type. However passing data between urls is a really challenging issue for me right now.

Can you provide a bit more details on what you are trying to do? I really don’t understand your initial post.

Thanks @brad appreciate your help. I am trying to pass data from one page to another using a url parameter.

I can set it all up to work with a static id but the moment I try to use a dynamic data picker referencing the url parameter it just serves the 500 error.

As I described above, attach the Browser component to your document, the one that receives the detail and use value of the pathparts[1] where you normally place the value of the URL parameter.

If you want more detail, please come back here.

@mgaussie
Are you sure you call the page with the URL param? How exactly does your URL look like? From the error it seems the url param is just missing, when you load the page.

That was hard to read.

2 Likes

Why do you say this @JonL?

Heroku is the probably the most popular(for good reasons) and easiest PaaS in the market. It is also backed by Salesforce.

It has a great free tier with 1000 monthly hours where you can have up to 100 apps per account and each with its own custom domain. It supports php and nodejs out of the box with zero configuration. You can clone your apps and put a free load balancer in front of them so they can handle traffic and you can shut those servers down when traffic decreases. All this for free.

It has one of the cheapest managed Postgresql databases in market for when you hit the free tier limits.

It uses AWS infrastructure so it is as reliable as it gets.

Compared to Bubble it stands between Hobby and Personal plans. You could have 100 different hobby apps with their domains(you can’t in Bubble) or you could have 1 single small app before even considering paying a penny.

Bashing Heroku and calling a 5$/month service proper hosting was quite hard to read to be honest :slight_smile:

3 Likes

Let it out Jon, let it out. :joy:

2 Likes

LOL I tried to contain it with a simple “that was hard to read” but @mgaussie had to release the kraken. He had to ask!

image

2 Likes

Hi @Teodor thank you for jumping in. I’m hopeful you can get me past this blocker.

So in the routing:
Screen Shot 2020-07-14 at 8.02.36 am

Server connect:

App Query:
Screen Shot 2020-07-14 at 8.04.42 am

Input parameters:
Screen Shot 2020-07-14 at 8.05.22 am

If I manually type in an id in input parameters, it works fine, if I leave it as query.id it fails and presents the 500 error.