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

Does it make a difference if you change the variable to number, rather than text, in server connect?

It may be when you type the id number in directly it works but the variable isn’t registering as a number so doesn’t?

Just tested that out, still the same 500 error unfortunately :frowning:

My question is - how do you call your page? Does your url contain the URL parameter?

Yes, I’ve shown that in the routing property above - it includes /:id/ parameter.

That’s not my question. What URL do you see in your browser? Just copy/paste it here. Mask out the real domain if you need.

On local:

http://localhost:3000/pitch/7/

On current Heroku env it would be appname.herokuapp.com/pitch/7/

the ‘7’ is with the value passed through to the url, otherwise if it’s not it would just display /pitch/:id/

Any ideas @Teodor?

Hello,
i checked this issue more detailed and i can confirm there is an issue with NodeJS and url params.
@patrick will check this and will fix it in the next update.

I’m sorry about this, you seem to have hit all the possible issues related to the NodeJS integration. NodeJS integration in Wappler is relatively new, so there are a few bugs we missed but these will be fixed soon.

Ok thank you @Teodor is there a rough eta for this?

Is there an alternative way you can recommend to achieve the same outcome ? Can’t be session or cookies as we want to share the unique url with anonymous visitors.

Matt

I’d say about a couple more weeks. Our team is currently having a summer break, so weekly updates will resume in a few weeks.

Can you please assist with this, too. 2 weeks is a nightmare for me and this app.

Well there is no other way to do this without using URL params (to share the unique url ). I’d suggest to just wait for the update for this part.

Here comes the geriatric once again.

If I share this link: https://fumantology.com/videos/24, do you see the result?

The URL param has been gleaned using the Browser component and is consequently used to filter the data.

How is that not a work around for the failing Params Query?

Am I missing something? Please say yes because that will be my booboo for the day.

Please note, the site is a slow work in progress.

Hi @ben works for me, so I’d say that’s a yes, i’m not sure if there would be any issues with NodeJS.

However, I don’t really follow how to make this work - I know how to include a browser component, and I know where the pathparts option is - I just don’t know what/how to write the dynamic part to give this a go. If you are open to a little step-by-step I could try this as a workaround until this is fixed in Node?

If you open https://fumantology.com/bok-tv, you will see on line #137
<a href="" class="btn" dmx-bind:href="'videos/'+videoEpisodeID">

This links it to the detail page called videos and have a URL param of the episode ID

Viewing the code of the videos page you will see

  1. line #51 <div is="dmx-browser" id="browser"></div> (the Browser component)
  2. line #121 <dmx-serverconnect id="scVideoEpisode" url="api/videoEpisodes/videoEpisode" dmx-param:episode="browser.location.pathparts[1]"></dmx-serverconnect> which filters the data according to the URL param

That’s all.

Thank you Ben!

The part I’m not 100% on is "browser.location.pathparts[1] - how/where do I input /capture the +videoEpisodeID?

I know +videoEpisodeID is the value passed through from the button to the browser URL - this part I’ve got sorted, i’m just not sure on how to pull that parameter into the new page. It’s failing using the normal url parameter approach with the GET and Variable (and this is the bug that will be fixed) - i’m just not sure how I do what you are saying on the actual data page.

Make sure that you have the correct rouring:

Thanks Ben, I’m passing everything through to the page ok, all my routing is setup correctly - I’m just not sure what the pathparts picks up, and what value I need to input on the page itself. I’ll have another play around and see if I can figure it out.