Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom webform issues #314

Open
3 tasks done
mariacha opened this issue Sep 9, 2024 · 3 comments
Open
3 tasks done

Zoom webform issues #314

mariacha opened this issue Sep 9, 2024 · 3 comments
Assignees

Comments

@mariacha
Copy link
Collaborator

mariacha commented Sep 9, 2024

  1. The webform's ip address (saved as remote_addr) does not match the value pulled by the [webform_submission:ip-address] on the Pantheon live site only.
  2. Also verify that the tracking info for email is being set. -- ignore this, we need more information

Dev tasks

  • In the wri_zoom module, add a new webform element WebformElement plugin that's "IP address". Examples can be found at web/modules/contrib/webform/src/Plugin/WebformElement.
  • Set that plugin's getValue method to return $this->getWebform()->hasRemoteAddr()) ? $this->getRequest()->getClientIp() : ''. That example was pulled from the code in webform, \Drupal\webform\WebformSubmissionForm::save.
  • Add an update hook that changes any fields webform fields that are currently setting their value to [webform_submission:ip-address] to use this plugin instead.
@komejo
Copy link
Contributor

komejo commented Sep 13, 2024

@mariacha In PR's: #319 https://github.com/wri/wriflagship/pull/1231

Note: in researching how to implement this I noticed the Pantheon docs mentioning remote_addr and how it "takes into account if the X-Forwarded-For header", but also had a big Warning about the global CDN. Just to be safe I used the X-Forwarded-For header as the likely best source with remote_addr as the fallback. In most cases I'd just use remote_addr but since WRI is a truly global client I thought a more comprehensive approach might be best.

komejo added a commit that referenced this issue Sep 16, 2024
#314: Add new IP Address element, update hook.
@mariacha
Copy link
Collaborator Author

Ok, I tested this out on develop and it's ready to go to live.

@mariacha
Copy link
Collaborator Author

@cpmadera This change went up with today's deploy. Can you let me know if the IP addresses are coming through correctly when you get a moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants