Error 500 when posting form from incognito mode on Chrome (hubspotutk)



Our server is getting a 500 error when a form is posted from incognito mode in Chrome. This error references the cookie "hubspotutk" as undefined.

[2018-08-11 19:56:09] production.ERROR: Undefined index: hubspotutk {"exception":"[object] (ErrorException(code: 0): Undefined index: hubspotutk at /home/forge/$ [stacktrace]

Has anyone had the same problem?



Hi @Gaston_Yelmini,

If the form is being posted from an ingocnito browser, it's possible that the visitor doesn't have a hubspotutk cookie. While this should not cause a 500 error response from HubSpot, it's possible that it's causing an error in your code since you're explicitly setting the $hubspotutk variable. Can you try the submission in an incognito window after confirming that the hubspotuk cookie exists using the Chrome dev tools?


Hi @Derek_Gervais, thank you for your answer.

I made a post and I can see that the hubspotutk cookie is missing. How should I handle this when its missign?

Thank you again.


Hi @Gaston_Yelmini,

I'm not particularly familiar with PHP, but after you set the variable can you check to see if it has a value? If there is no hubspotutk value, you shouldn't include it in the form submission.