Automattic / Automattic/jetpack
Contact Form: incompatibility with W3 Total Cache database cache
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
0. In W3 Total Cache, go to database cache and turn the module on.
1. Activate and connect Jetpack, enable the Contact Form module.
2. Create a new page with the following shortcode:
```
[contact-form subject='My subject line here'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Contact Number' type='text' required='1'/][contact-field label='Company' type='text' required='1'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]
```
3. Submit a form.
4. Check your inbox. Contact number and Company fields will be missing from the email you received.
**With database caching on (using memcached or APC doesn’t make a difference), the custom fields in the contact form won’t be submitted.**
Reported here:
https://wordpress.org/support/topic/jetpack-contact-form-with-custom-field-does-not-include-in-email-body/
Contributor guide
Research direction
Reproduce the issue with W3 Total Cache database caching enabled, Jetpack Contact Form active, and the provided shortcode, then compare the submitted fields with the email body. Start by tracing the contact form submission and email handling around the custom fields. Done when the Contact Number and Company fields are included in emails with database caching enabled, including for memcached and APC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- memcached, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100