CMS Development

afdallah_arafat
Teilnehmer/-in | Diamond Partner
Teilnehmer/-in | Diamond Partner

{{ request_contact }} variable returning error.

lösung

Hi there,
{{ request_contact }} variable suddenly not working, and give me this error message 
`InterpretException: Error resolving expression [request_contact]: NullPointerException:`


It used to work and my template has been using that variable for so long and had no issue. I wonder is there a new update (breaking changes) to the HubSpot variables or I missed out on something.
https://prnt.sc/13sg4xk

0 Upvotes
1 Akzeptierte Lösung
afdallah_arafat
Lösung
Teilnehmer/-in | Diamond Partner
Teilnehmer/-in | Diamond Partner

{{ request_contact }} variable returning error.

lösung

I tested on the other day it magically works. Not sure what was internally happened with Hubspot.

Lösung in ursprünglichem Beitrag anzeigen

4 Antworten
afdallah_arafat
Lösung
Teilnehmer/-in | Diamond Partner
Teilnehmer/-in | Diamond Partner

{{ request_contact }} variable returning error.

lösung

I tested on the other day it magically works. Not sure what was internally happened with Hubspot.

afdallah_arafat
Teilnehmer/-in | Diamond Partner
Teilnehmer/-in | Diamond Partner

{{ request_contact }} variable returning error.

lösung

Hi @narmstrong narmstrong.
Actually, in my code, I use request_contact.is_logged_in to display content based on user login status. It threw the same error message. I don't think it's because I call the dictionary. Here is the actual code. https://pastebin.com/wkwHsC5X

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

{{ request_contact }} variable returning error.

lösung

Hi @afdallah_arafat ,

I would try changing that if statement to just looking for request_contact.is_logged_in and maybe think more along the lines of is it euqal to true or false

{% if request_contact.is_logged_in == true %}

0 Upvotes
narmstrong
Mitwirkender/Mitwirkende | Platinum Partner
Mitwirkender/Mitwirkende | Platinum Partner

{{ request_contact }} variable returning error.

lösung

Hello,

request_contact is a dictionary I believe. I think you may need to specify what you are requesting. eg {{request_contact.is_logged_in}}

What is it you are trying to do exactly?

Noah Armstrong | TSL Marketing
Senior Developer
6085 Marshalee Dr| Suite 100 | Elkridge, MD 21075
Contact Us

TSL Marketing