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

fix(compat): resolve caching conflict with W3TC #2780

Closed
Benunc opened this issue Feb 6, 2018 · 2 comments
Closed

fix(compat): resolve caching conflict with W3TC #2780

Benunc opened this issue Feb 6, 2018 · 2 comments
Assignees
Milestone

Comments

@Benunc
Copy link
Member

Benunc commented Feb 6, 2018

Issue Overview

When database caching is enabled in W3 Total Cache, all donor IDs and donation amounts are not stored in the database at the time of the donation.

Expected Behavior

Our plugin should play nicely with database caching or be able to bust the cache at the time of donation.

Current Behavior

The Donor ID is saved incorrectly, resulting in (donor missing) on the list of Donations, since Give can't find a donor id of 0.

screen shot 2018-02-06 at 3 26 18 pm

This results in the name being mis-displayed:

If, for example, the Firstname/Lastname of the donor is entered as "Bob Smith" it is saved to the back end of a donation as Bob Smith ()

That part is fixable in the UI, but the missing donation amount (stored in the DB as 0) means that the user has to cross-reference with the payment gateway to fix that.

Steps to Reproduce (for bugs)

  1. Install Give and W3TC: https://wordpress.org/plugins/w3-total-cache/
  2. In the W3TC settings, (Performance > General Settings > Database Cache) ensure that Database caching is enabled.
  3. Process a donation in an incognito browser window (any gateway, Test donation will produce the error)
  4. View all Donations. The donor name is displayed as (donor missing) and the donation amount will be $0.
  5. View the Database, to confirm the screenshot above.

Related Issues and/or PRs

Potentially related to #2710

WordPress Environment

### WordPress Environment ###

Home URL: http://w3tc.local
Site URL: http://w3tc.local
WP Version: 4.9.4
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
Permalink Structure: /%postname%/
Show on Front: posts
Table Prefix Length: wp_
Table Prefix Length: 3
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, cancelled, abandoned, processing, preapproval

Server Environment

Hosting Provider: DBH: localhost, SRV: w3tc.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.10 (Debian)
PHP Version: 7.0.3
PHP Post Max Size: 1,000 MB
PHP Time Limit: 900
PHP Max Input Vars: 3000
PHP Max Upload Size: 1,000 MB
cURL Version: ❌ 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: 5.6.34
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.0.2
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions✔New User Registration✔User Registration Information✔Email access
Upgraded From: –
Test Mode: Enabled
Currency Code: USD
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://w3tc.local/donation-confirmation/
Failure Page: http://w3tc.local/donation-failed/
Donation History Page: http://w3tc.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Stripe - Credit Card, PayPal Standard, Test Donation, Offline Donation
Default Payment Gateway: Stripe - Credit Card
PayPal IPN Verification: Enabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Session Configuration

Give Use Sessions: Enabled
Session: Disabled

Active Give Add-ons

Give - Stripe Gateway: ❌ Unlicensed – by WordImpress – 1.5.2

Other Active Plugins

W3 Total Cache: by Frederick Townes – 0.9.6

Inactive Plugins

Theme

Name: Twenty Seventeen
Version: 1.4
Author URL: https://wordpress.org/
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

@mathetos
Copy link
Member

mathetos commented Feb 7, 2018

I think for "Steps to Reproduce" it's important to add these next steps as well:

  1. Go to W3TC settings and disable DB caching
  2. Do a new test donation
  3. View donation details and confirm that all was saved correctly as intended.

@kevinwhoffman kevinwhoffman changed the title fix: resolve conflict with W3TC fix(compat): resolve caching conflict with W3TC Feb 21, 2018
@Benunc
Copy link
Member Author

Benunc commented Feb 23, 2018

This one is definitely going to need to go on a milestone, we'll get a ton of these. Got another today.

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

4 participants