I’m trying to wrap my head around what the difference could be between my staging and my production site. They’re both setup on the same git repo, as far as I know the only difference is domain config in Trellis.
Upon form submission, the redirect works on Staging, but does not work in Production.
It seems the assets in <head> are entirely different. Production has fewer, and it’s giving me some jQuery errors.
My JS skills are sub-par, so I’ll figure that out on my own time. But I’d love it if someone could help me understand why the two environments are different, and what causes that. Do they have a different build process?
My plugins are all activated on both, although I noticed I had GF’s No Conflict mode “off” in staging and “on” in production. That didn’t fix it though.
Nick, did you want me to try adding that in assets/scripts/main.js?
I’m still not grasping why all those assets switched from <head> to <footer>.
Notes:
I’m using a split-testing php script that alternates loading 2 forms. Worth noting, but it’s configured the same on both environments so I don’t see that being an issue.
The form entries are being collected by GravityForms in the production env, so it’s definitely activated and working (same goes for partial entries).
It’s PHP/a WordPress filter. So put it in lib/extras.php if you’re using Sage or functions.php if you’re using another theme (or anywhere you think it’s better placed e.g. other gravity forms modifications).
Quite an obscure issue considering most people aren’t split testing forms, but I’ll contact David Smith (the guy who wrote it) over at Gravity Wiz and see if he can pin point it.
Thanks for the help guys!
P.S. I’m still not entirely clear why my staging site was loading Gravity Forms assets in the <head> and my production was loading it below the <footer>. I’d love to understand that if anyone knows.