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: Prevent fatal error when WP Rocket is enabled #3667

Closed
raftaar1191 opened this issue Sep 10, 2018 · 3 comments
Closed

fix: Prevent fatal error when WP Rocket is enabled #3667

raftaar1191 opened this issue Sep 10, 2018 · 3 comments
Assignees

Comments

@raftaar1191
Copy link
Contributor

raftaar1191 commented Sep 10, 2018

@samsmith89 commented on Sat Aug 04 2018

User Story

As a site admin, I want to use both Give and WP Rocket so that I can have this caching solution and accept donations.

Current Behavior

I currently attempt to process a donation and get a fatal error. The payment doesn't process at the gateway.

Expected Behavior

I expect to run both plugins without issues.

Steps to Reproduce

  1. Download and install WP Rocket at the link provided
  2. Process donation and see fatal error

Visuals

screen shot 2018-08-03 at 5 02 36 pm

Link to WP Rocket download:
https://drive.google.com/file/d/12kDnbKU4BJM_sQ6KIxjpujeAqWr4VVqE/view?usp=sharing

Related

https://secure.helpscout.net/conversation/633874959/22874?folderId=1823994

Environment

WordPress System Info ### WordPress Environment ###

Home URL: http://give.local
Site URL: http://give.local
WP Version: 4.9.8
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, request-pending, request-confirmed, request-failed, request-completed, wc-pending, wc-processing, wc-on-hold, wc-completed, wc-cancelled, wc-refunded, wc-failed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription

Server Environment

Hosting Provider: DBH: localhost, SRV: give.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.2.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✔Daily Email Report✔Weekly Email Report✔Monthly Email Report❌Renewal Receipt Email✔Subscription Cancelled Email❌Subscription Completed Email✔Subscription Reminder Email✔Subscriptions Email Access
Upgraded From: –
Test Mode: Enabled
Currency Code: USD
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://give.local/donation-confirmation/
Failure Page: http://give.local/donation-failed/
Donation History Page: http://give.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Braintree
Default Payment Gateway: Braintree
PayPal IPN Verification: Disabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Active Give Add-ons

Give - Authorize.net Gateway: ✔ Licensed – by WordImpress – 1.4.2
Give - Braintree Gateway: ❌ Unlicensed – by WordImpress – 1.2.2
Give - CCAvenue Gateway: ✔ Licensed – by WordImpress – 1.0.2
Give - Email Reports: ✔ Licensed – by WordImpress – 1.1.2
Give - Form Field Manager: ✔ Licensed – by WordImpress – 1.3
Give - MailChimp: ✔ Licensed – by WordImpress – 1.4.1
Give - Manual Donations: ✔ Licensed – by WordImpress – 1.4.1
Give - PayPal Pro Gateway: ✔ Licensed – by WordImpress – 1.1.6
Give - Paytm Gateway: ✔ Licensed – by WordImpress – 1.0
Give - PDF Receipts: ✔ Licensed – by WordImpress – 2.3
Give - Recurring Donations: ✔ Licensed – by WordImpress – 1.7.2
Give - Stripe Gateway: ✔ Licensed – by WordImpress – 2.0.10
Give - Tributes: ✔ Licensed – by WordImpress – 1.5.0

Other Active Plugins

Duplicate Post: by Enrico Battocchi – 3.2.2
Give - Hook Helper: by Ravinder Kumar – 1.0
Indeed Ultimate Affiliate Pro: by indeed – 1.5
Mailgun: by Mailgun – 1.5.11
Page Builder by SiteOrigin: by SiteOrigin – 2.7.3
Sam's Helper Function: by WordImpress – 1.0
User Role Editor: by Vladimir Garagulya – 4.44
WooCommerce: by Automattic – 3.4.4
WP Business Reviews: by Impress.org – 1.0.0

Inactive Plugins

Give - Fee Recovery: by WordImpress – 1.7.1
WooCommerce Paytm Payment Gateway: by Paytm – 0.2
WooCommerce Paytm Payment Gateway: by FTI Technologies – 1.0
WP Courseware: by Fly Plugins – 4.4.4
WP Rocket: by WP Media – 3.0.5.1

Active MU Plugins

Bypass Login: by Stephen Carnam – 1.1.0

Theme

Name: Twenty Seventeen
Version: 1.6
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

Operating System
  • Platform: Mac OS X
Browser
  • Name: Chrome

@kevinwhoffman commented on Thu Aug 16 2018

@Benunc It would be good to loop in the WP Rocket team with a full stack trace.

@samsmith89 It looks like the screenshot of the stack trace has been cut off. The bottom rows are most important as they provide information about the last function call that triggered the error. Are you able to get a screenshot of the full trace so we can give WP Rocket as much detail as possible?


@raftaar1191 commented on Mon Sep 10 2018

@samsmith89 @Benunc @kevinwhoffman

I am able to regenerate this issue in the Core Give Plugin itself and this issue exists in WP Rocket

Video Link: https://screencast-o-matic.com/watch/cFQ6DXqE7X

Debug Log

[10-Sep-2018 16:07:47 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_home_path() in /app/public/wp-content/plugins/wp-rocket/inc/functions/htaccess.php:21 Stack trace: #0 /app/public/wp-content/plugins/wp-rocket/inc/functions/admin.php(250): flush_rocket_htaccess() #1 /app/public/wp-includes/class-wp-hook.php(288): rocket_after_update_single_options(Array, Array) #2 /app/public/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 /app/public/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /app/public/wp-includes/option.php(401): do_action('update_option_g...', Array, Array, 'give_settings') #5 /app/public/wp-content/plugins/Give/includes/admin/class-give-settings.php(916): update_option('give_settings', Array, false) #6 /app/public/wp-content/plugins/Give/includes/payments/class-give-sequential-donation-number.php(131): give_update_option('sequential-orde...', 129) #7 /app/public/wp-includes/class-wp-hook.php(286): Give_Sequential_Donation_Number->__save_donation_title(171, Object(WP_Post), false) # in /app/public/wp-content/plugins/wp-rocket/inc/functions/htaccess.php on line 21

System Report

### WordPress Environment ###

Home URL: https://givewp.local
Site URL: https://givewp.local
WP Version: 4.9.8
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: Inaccessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval

Server Environment

Hosting Provider: DBH: localhost, SRV: givewp.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.10 (Debian)
PHP Version: 7.2.0
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.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.2.4
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: 2.2.4
Test Mode: Enabled
Currency Code: EUR
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: https://givewp.local/donation-confirmation/
Failure Page: https://givewp.local/donation-failed/
Donation History Page: https://givewp.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Offline Donation
Default Payment Gateway: Test Donation
PayPal IPN Verification: Enabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Active Give Add-ons

Other Active Plugins

WP Rocket: by WP Media – 3.0.5.1

Inactive Plugins

BuddyPress: by The BuddyPress Community – 3.0.0
Caldera Forms: by Caldera Labs – 1.5.9.1
Charitable: by WP Charitable – 1.6.1
Debug Bar: by wordpressdotorg – 0.9
Debug Bar Console: by koopersmith – 0.3
Debug Bar Cron: by Zack Tollman, Helen Hou-Sandi – 0.1.2
Debug Bar Extender: by Thorsten Ott, Automattic – 0.5
Developer: by Automattic – 1.2.6
Duplicate Post: by Enrico Battocchi – 3.2.2
Email Cop: by Ashfame – 0.1.1
Give - 2Checkout Gateway: by WordImpress – 1.1.1
Give - AmeriCloud Payments: by AmeriCloud Solutions, Inc. – 1.2.0
Give - Authorize.net Gateway: by WordImpress – 1.4.2
Give - AWeber: by WordImpress – 1.0.3
Give - Braintree Gateway: by WordImpress – 1.2.2
Give - CCAvenue Gateway: by WordImpress – 1.0.2
Give - Constant Contact: by WordImpress – 1.2.1
Give - ConvertKit: by WordImpress – 1.0.2
Give - Currency Switcher: by WordImpress – 1.2.2
Give - Display Donors: by WordImpress, LLC – 1.0
Give - Donation Upsells for WooCommerce: by WordImpress – 1.0.3
Give - Dwolla Gateway: by WordImpress – 1.1.2
Give - Email Reports: by WordImpress – 1.1.2
Give - Fee Recovery: by GiveWP – 1.7.2
Give - Form Countdown: by WordImpress – 1.0.1
Give - Form Field Manager: by WordImpress – 1.4.0
Give - Gift Aid: by WordImpress – 1.1.6
Give - GoCardless Gateway: by WordImpress – 1.2.1
Give - Google Analytics Donation Tracking: by GiveWP – 1.2.1
Give - iATS Payment Solutions: by WordImpress – 1.0.3
Give - MailChimp: by WordImpress – 1.4.1
Give - Manual Donations: by WordImpress – 1.4.1
Give - Mollie Gateway: by WordImpress – 1.1.2
Give - PayFast Payment Gateway: by WordImpress – 1.0.2
Give - Paymill Gateway: by WordImpress – 1.1
Give - PayPal Pro Gateway: by GiveWP – 1.2.0
Give - Paytm Gateway: by WordImpress – 1.0
Give - PayUmoney: by WordImpress – 1.0.1
Give - PDF Receipts: by WordImpress – 2.3.0
Give - Per Form Gateways: by WordImpress – 1.0.1
Give - Razorpay: by WordImpress – 1.2.0
Give - Razorpay Recurring: by WP Buffs – 1.0
Give - Recurring Donations: by WordImpress – 1.8.0
Give - Sofort Payment Gateway: by WordImpress, CoachBirgit – 1.0
Give - Square: by WordImpress – 1.0.0
Give - Stripe Gateway: by GiveWP – 2.1.0
Give - Tributes: by WordImpress – 1.5.0
Give - WePay Gateway: by WordImpress – 1.3.1
Give - Zapier: by WordImpress – 1.2.1
Gravity Forms: by rocketgenius – 2.2.6
Gravity Forms Signature Add-On: by Rocketgenius – 3.4
Gutenberg: by Gutenberg Team – 3.6.2
Loco Translate: by Tim Whitlock – 2.1.4
Log Deprecated Notices: by Andrew Nacin – 0.4
Log Viewer: by Markus Fischbacher – 14.05.04
Monster Widget: by Automattic – 0.3
PHP Compatibility Checker: by WP Engine – 1.4.5
Polylang: by Frédéric Demarle – 2.3.6
qTranslate-X: by qTranslate Team – 3.4.6.8
Query Monitor: by John Blackbourn & contributors – 3.0.1
Rewrite Rules Inspector: by Daniel Bachhuber, Automattic – 1.2.1
User Switching: by John Blackbourn & contributors – 1.3.1
WooCommerce: by Automattic – 3.4.5
WordPress Beta Tester: by Peter Westwood – 1.2.2
WP Hide & Security Enhancer: by Nsp Code – 1.4.9.1
WPML Multilingual CMS: by OnTheGoSystems – 3.9.4
WPS Hide Login: by WPServeur, NicolasKulka, tabrisrp – 1.3.4.2

Theme

Name: Twenty Seventeen
Version: 1.7
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

@kevinwhoffman
Copy link
Contributor

@raftaar1191 Can you confirm if this error occurs when only Give Core and WP Rocket are enabled? Or does Braintree need enabled in order to see the error?

@raftaar1191
Copy link
Contributor Author

@samsmith89 @Benunc @kevinwhoffman

I am able to regenerate this issue in the Core Give Plugin itself and this issue exists in WP Rocket

So we do not need Braintree Add-on to regenerate this issue.

Video Link: screencast-o-matic.com/watch/cFQ6DXqE7X

@kevinwhoffman kevinwhoffman changed the title fix(braintree): ensure there is no fatal error when WP Rocket is enabled fix: Prevent fatal error when WP Rocket is enabled Sep 19, 2018
@raftaar1191
Copy link
Contributor Author

raftaar1191 commented Sep 27, 2018

Duplicate issue so closing this issue in favor of #3666

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