Has anyone else noticed the query manager / route parameters not working?

Hey all,

All of a sudden route parameters don’t appear to be working.

I have setup the route as /blog/:slug and this appears correctly on the page, and in the html. I have a query manager with slug correctly added.

I then setup a basic paragraph element and the dynamic value is the query managers slug value, and no data is appearing.

It’s not really clear what is not appearing where.
Can you post some code which shows what and where is used on the page?

1 Like

Sure @Teodor

So this is the code on the page relating to the route param:

<dmx-query-manager id="query1"></dmx-query-manager>
<dmx-serverconnect id="load" url="api/blog/load_blog_single" dmx-param:slug="query1.slug"></dmx-serverconnect>
<meta name="ac:route" content="/blog/:slug"> 

You can see I have the route content as /blog/:slug

Here is the route properties:
Screen Shot 2020-11-25 at 5.25.32 pm

On the page to test the Query Manager and if it picks up the route parameter, I put a simple data binding:

<p>A {{query1.data.slug}}</p>

And here is an image of the query manager setup:
Screen Shot 2020-11-25 at 5.26.30 pm

This is happening on two completely seperate projects now.

Is that enough info? Please let me know what else I can share.

Is the:

<meta name="ac:route" content="/blog/:slug"> 

located on top of the page?
Do you see the query returning values in console, using dmx.app.data?

query manager data is empty:
Screen Shot 2020-11-25 at 5.46.38 pm

ac:route is located as high as it can go on a content page. (I’m using NodeJS with layout template and content page).

I actually encountered the same late last night.
Was pretty late so did not have time to dig deeper. Thought I had accidentally deleted something

Please test the following update, it should fix the issues with query params:

dmxAppConnect.zip (22.6 KB)

And by the way, you can access the query params directly under app > query :slight_smile: So it results in query.myparam - no need to go through the query manager for this.

Thanks @Teodor but this doesn’t appear to have solved it.

Can you just confirm where exactly do we replace the file? I have replaced:

Wappler/dmxAppConnect/dmxAppConnect.js

Yes, but make sure you clear your browser cache!

Will do. What about the one in the public folder. Do we replace that one too?

Wappler/projectname/public/dmxAppConnect/dmxAppConnect.js ?

You need to replace the file located in your public folder … it is the one used on your pages.
/public/dmxAppConnect/dmxAppConnect.js - i thought we were already talking about it.

oh dear… I replaced the one in the Wappler main folder. Will that cause any issues? If so - could you send the correct file over?

I don’t know which folder do you call ‘Wappler main folder’ :slight_smile:
Just for future reference - when we ask you to replace js files (related to app connect), related to specific issue in specific project it is always the files located in the public folder of this specific folder.

Got it thank you.

The main folder and file that I replaced first:

Wappler/dmxAppConnect/dmxAppConnect.js - is this OK? Or do I need to revert this with an original?

Regarding replacing the file in public folder for the project - I’ve done this, and still no change unfortunately. I even tried a completely different browser with a completely cleared cache.

Sorry but what is this folder exactly? Where is it located on your hard drive?

Is the {{query.slug}} working on your page? Have you uploaded the changes to your server?

I’m going to restart everything just to triple check your update is not working. 2 minutes.

Re: the folder.

This is literally the main folder that all projects sit inside. The root folder for Wappler sitting in ‘documents’ on my mac.

Unfortunately not working. In Chrome or Safari, cleared caches.

Console shows query1 as having no data, same as before.

The data binding on the page when I select from query manager actually shows as: {{query1.data.slug}} but I tried {{query1.slug}} anyway and no luck.

I see the problem on a node view / content page. Will check with @patrick and post an update here.

1 Like

Actually it works for me when i call the query param directly (not through the state manager). I am sure it will work for you as well change this to {{query.slug}}

We will check the query manager issue though.

I’ll try that, and remove the Query Manager.

Something to note - the reason I used the Query Manager was because when you add a value to the app query - it’s not actually available in the data picker.

Can you please also advise if I have screwed anything up by editing the appconnect file in the root wappler folder in documents?