request.query_dict empty on live site, but available in staging/preview

Hi all,

happy new year!

I wanted to add some dynamic content to a single cms page (mainly opengraph tags) by using get-parameters.

I was able to access the get parameters with the request.query_dict variable and as a result I managed to modify the opengraph tags while testing in staging.

But on the live page the “request.query_dict” is empty and while trying around it shows up again only when appending hsDebug=true.

Also tried to use a variable that prevents caching like “local_dt” in the context, but it didn’t help.

I did not find any hint in the documentation nor makes it sense to me, that request parameters seem to be gone. I would understand that caching may delay the expected result, but it never worked within a period of 24h.

Anyane here has an idea?

thanks

Elmar

Hi, @nbhs_dev :waving_hand: Thanks for reaching out! Hey, @alyssamwilie @Jnix284 @Indra, do you have any experience with the challenge @nbhs_dev is describing?

Thank you! — Jaycee

I wish I could be more helpful @Jaycee_Lewis , but unforutnately @nbhs_dev it sounds like it is cache related since it works properly on the live site when using hsDebug and I’m not familiar enough with this request to be able to troubleshoot. Hopefully one of the others will have some insight!

@Jaycee_Lewis, thanks for mentioning.

@nbhs_dev Like @Jnix284 is saying it looks like a caching issue. Do you have a test link and code? This could help solving the problem. If it’s caching related, you can ask HubSpot Support to disable caching for specific pages.

Thanks for all your comments. I believe it is a caching issue as well… but I wonder anyhow, because the request.query_dict variable is constanly empty. It if is caching issue I would expect it to have some older, expired, outdated values .. but not empty :slightly_smiling_face:

As hsDebug is available to all public users how know about it, it does not expose sensitive information. But it is a bit “hacky” in the end…

You can review the sample here
https://www.emnify.com/careers/openings/job-detail?gh_jid=4103337101&jobtitle=Solutions%20Engineer%20-%20US%20(East)&hsDebug=true

The inner content is partially generated by a REST API and I need the page to reflect some of the data in the og:metas - because LinkedIn, Facebook etc ignores dynamically generated og tags. So I came up with those inbound links containing all the necessary data as http get vars.

I might generate those pages from hubdb and sync the data over, but the overall process for the customer is better when it is an ordinary cms page.

Thanks again

-Elmar