impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
344 stars 191 forks source link

fix: ensure compatibility with pagebuilder by SiteOrigin plugin #3823

Closed marutim closed 5 years ago

marutim commented 6 years ago

Bug Report

User Story

As a user, I would like the Give plugin to play nicely with the Page Builder by SiteOrigin Plugin

At the moment, when I add the Give - Donation form widget in a row created by the page builder. It does not work. It does not throw any error but if you publish/update the page and check the widget, you will see there is no Give form selected

We can not even use the Give donation form shortcode in the siteOrigin editor widget. It outputs nothing.

Current Behavior

Give donation widget or shortcode does not work with Pagebuilder.

Bug Type

Steps to Reproduce

  1. Install the Pagebuilder by SiteOrigin plugin on your website.
  2. In a new page add a row and then add the Give donation form widget, also try the give donation form shortcode in the siteorigin Editor widget.
  3. You will see no outputs in the front end.

Visuals

image edit page wp give wordpress

Related

HS Links: https://secure.helpscout.net/conversation/692350522/27903/ https://secure.helpscout.net/conversation/707569136/29211/

Acceptance Criteria

Environment

### WordPress Environment ### Home URL: http://wp-give-new.local Site URL: http://wp-give-new.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, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription ### Server Environment ### Hosting Provider: DBH: localhost, SRV: wp-give-new.local TLS Connection: Connection uses TLS 1.2 TLS Connection: Probably Okay Server Info: nginx/1.14.0 PHP Version: 7.2.9 PHP Post Max Size: 1,000 MB PHP Time Limit: 1200 PHP Max Input Vars: 4000 PHP Max Upload Size: 300 MB cURL Version: 7.52.1, OpenSSL/1.0.2l SUHOSIN Installed: – MySQL Version: 5.7.23 Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ gzip: ✔ GD Graphics Library: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Give Configuration ### Give Version: 2.3.0 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✔Donor Note✔Email access✔Renewal Receipt Email✔Subscription Cancelled Email✔Subscription Completed Email✔Subscription Reminder Email✔Subscriptions Email Access Upgraded From: 1.8.19 Test Mode: Enabled Currency Code: EUR Currency Position: After Decimal Separator: . Thousands Separator: , Success Page: http://wp-give-new.local/donation-confirmation/ Failure Page: http://wp-give-new.local/donation-failed/ Donation History Page: http://wp-give-new.local/donation-history/ Give Forms Slug: /donations/ Enabled Payment Gateways: Test Donation, PayPal Standard, Stripe - Credit Card Default Payment Gateway: Test Donation PayPal IPN Verification: Enabled PayPal IPN Notifications: N/A Donor Email Access: Enabled ### Active Give Add-ons ### Give - Authorize.net Gateway: ✔ Licensed – by WordImpress – 1.4.3 Give - Currency Switcher: ❌ Unlicensed – by GiveWP – 1.3.0 Give - Fee Recovery: ❌ Unlicensed – by GiveWP – 1.7.2 Give - Form Field Manager: ❌ Unlicensed – by GiveWP – 1.4.0 Give - Gift Aid: ✔ Licensed – by WordImpress – 1.1.6 Give - MailChimp: ✔ Licensed – by WordImpress – 1.4.1 Give - Manual Donations: ✔ Licensed – by WordImpress – 1.4.1 Give - Mollie Gateway: ❌ Unlicensed – by WordImpress – 1.1.2 Give - PayPal Pro Gateway: ❌ Unlicensed – by GiveWP – 1.2.0 Give - PayUmoney: ❌ Unlicensed – by GiveWP – 1.0.2 Give - PDF Receipts: ✔ Licensed – by WordImpress – 2.3 Give - Per Form Gateways: ✔ Licensed – by WordImpress – 1.0.1 Give - Recurring Donations: ✔ Licensed – by WordImpress – 1.8.1 Give - Stripe Gateway: ❌ Unlicensed – by GiveWP – 2.1.1 Give - Tributes: ✔ Licensed – by WordImpress – 1.5.0 ### Other Active Plugins ### Debug Bar: by wordpressdotorg – 0.9 Email Cop: by Ashfame – 0.1.1 Page Builder by SiteOrigin: by SiteOrigin – 2.9.1 User Switching: by John Blackbourn & contributors – 1.4.0 ### Inactive Plugins ### Automatic Responsive Tables: by Andrew Rockwell – 1.2 Debug Bar Post Meta: by whyisjake – 0.5.5 Give - AmeriCloud Payments: by AmeriCloud Solutions, Inc. – 1.2.0 Give - Braintree Gateway: by WordImpress – 1.1.1 Give - CCAvenue Gateway: by WordImpress – 1.0.2 Give - Constant Contact: by WordImpress – 1.2.1 Give - ConvertKit: by WordImpress – 1.0.1 Give - CSV Toolbox: by WordImpress – 1.0 Give - Email Reports: by WordImpress – 1.1.1 Give - Form Countdown: by WordImpress – 1.0.1 Give - GoCardless Gateway: by WordImpress – 1.2 Give - Google Analytics Donation Tracking: by WordImpress – 1.1.1 Give - Hook Helper: by Ravinder Kumar – 1.0 Give - Paytm Gateway: by WordImpress – 1.0 Give - Per Form User Role Assigner: by Matt Cromwell – 1.0 Give - Recurring Helper: by WordImpress – 1.0 Give - Zapier: by WordImpress – 1.2.1 My Custom Functions: by Space X-Chimp – 4.30 Shortcode in Menus: by Gagan Deep Singh – 3.4 SiteOrigin Widgets Bundle: by SiteOrigin – 1.13.2 The Events Calendar: by Modern Tribe, Inc. – 4.6.25 The Events Calendar: Eventbrite Tickets: by Modern Tribe, Inc. – 4.5.5 WP Filters Extras: by BeAPI – 1.0.2 ### Active MU Plugins ### Local by Flywheel Relative URL (for Live Links): by Flywheel – 1.0 ### 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 commented 6 years ago

@kakshak Please investigate and report back with the cause of the conflict. If your estimate is less than a 5, move forward with a fix. Otherwise mark it for discussion and we will review it together.

kakshak commented 6 years ago

@kevinwhoffman I've found the cause the issue. The issue is with $instance['id'] of Form. The ID is not proper set with Page Builder by SiteOrigin plugin. So, that's why it's not able to save the Form in Admin-area as well as not displaying in Front-end. But to Fix this issue, I'll require more then 5 hours.

So, please let me know your thoughts on this. Please let me know when you're available So we can discuss this together.

kevinwhoffman commented 5 years ago

@kakshak We can discuss after this week's team call so I can better understand the issue. Thanks.

kevinwhoffman commented 5 years ago

Slack Call Summary

Participants: @kakshak @kevinwhoffman Topic: Compatibility of Give donation form widget within Site Origin page builder Result: Kakshak and I have reviewed this issue and confirmed that the Give donation form shortcode and widget work as expected when you are outside of the Site Origin page builder. However when you select the donation form widget as a "block" within the page builder, then the widget fails to render. We believe this is because the form ID field is not being saved correctly, because when you return to the widget-block after save, the form field is reset to default value.

@marutim I have advised Kakshak to investigate this for one more hour, and if he cannot find a solution, we will contact the Site Origin developers for assistance.

In the meantime, we have confirmed that pasting the shortcode [give_form id="xx"] into the Text or Custom HTML blocks within the Site Origin page builder seems to work as expected. You can provide that as a workaround to the customer for now.

kakshak commented 5 years ago

@kevinwhoffman I've looked over the ID updation code in page builder plugin and I think the way that they have updated the ID that is conflicting with our plugin because ID is updated wrong from their way. Don't know why exactly. But I still need 1 hour to debug this functionality. If there is anything then I'll update you for the same.

kevinwhoffman commented 5 years ago

Slack Call Summary

Participants: @kevinwhoffman @kakshak Topic: Why Site Origin widgets are overriding the Give Form ID field Result: We have discovered that the Give form widget uses an id property to indicate the form ID that should be rendered in the widget. When Site Origin saves a widget within the page builder, it also uses an id property to indicate the widget ID, which causes the Give form ID to be overwritten. The only solution we see is for either Give or Site Origin to change the name of the id property to something more specific like form_id for Give or widget_id for Site Origin.

Changing the id property for Give could have harmful effects on backwards compatibility and cause existing widgets to break, so for now we are recommending the shortcode workaround described in https://github.com/impress-org/give/issues/3823#issuecomment-440566741.

I will discuss with @DevinWalker and determine whether we think it is worth putting more time into a compatibility fix that does not appear obvious at the moment.

kevinwhoffman commented 5 years ago

Per team discussion, we are iceboxing and relying on the shortcode workaround unless additional reports come in.

marutim commented 5 years ago

Today, the user followed back checking for updates.

mikejhale commented 5 years ago

Closed, Replaced with #3962