When the Tributes plugin is active and the "give_tributes_text" option is missing, will prevent a Manual Donation from being recorded because the Create Donation button is disabled #7541
Labels
type: bug
Existing functionality is broken
User Story
When the Tributes plugin is active and the "give_tributes_text" option is missing, will prevent a Manual Donation from being recorded because the Create Donation button is disabled.
This occurs when the Tributes feature is "Disabled".
Agileware Ref: SUP-72955
Details
A GiveWP JSON request fails when fetching the give_tributes_text option. Error output below. This causes the Create Donation button to remain disabled.
2024-09-17 15:44:46 [Tue Sep 17 05:44:46.273135 2024] [php:error] [pid 125:tid 125] [client 192.168.65.1:59224] PHP Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /var/www/html/wp-content/plugins/give-tributes/includes/give-tributes-helpers.php:51\nStack trace:\n#0 /var/www/html/wp-content/plugins/give-tributes/includes/give-tributes-helpers.php(51): json_decode(Array)\n#1 /var/www/html/wp-content/plugins/give-tributes/includes/public/class-give-tributes-public.php(347): give_tributes_type_output(25115, true)\n#2 /var/www/html/wp-content/plugins/give-tributes/includes/admin/class-give-tributes-admin.php(2299): Give_Tributes_Public->dedicate_donation(25115)\n#3 /var/www/html/wp-includes/class-wp-hook.php(324): Give_Tributes_Admin->give_tributes_include_response(Array, 25115)\n#4 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)\n#5 /var/www/html/wp-content/plugins/give-manual-donations/give-manual-donations.php(573): apply_filters('give_md_check_f...', Array, 25115)\n#6 /var/www/html/wp-includes/class-wp-hook.php(324): Give_Manual_Donations->check_form_setup('')\n#7 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)\n#8 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)\n#9 /var/www/html/wp-admin/admin-ajax.php(192): do_action('wp_ajax_give_md...')\n#10 {main}\n thrown in /var/www/html/wp-content/plugins/give-tributes/includes/give-tributes-helpers.php on line 51, referer: https://penguin.linux.test/wp-admin/edit.php?post_type=give_forms&page=give-manual-donation
Workaround
The workaround (or fix) is to save the default settings for the Tributes on page, /wp-admin/edit.php?post_type=give_forms&page=give-settings&tab=tributes
Then return to the Manual Donation form and the Create Donation button will become active when the form options are selected.
Expected Behaviour
Create Donation button should not be disabled.
Steps to Reproduce
Visuals
Additional Context
System Information
Active GiveWP Add-ons
Give - Annual Receipts: ✔ Licensed – by GiveWP – 1.1.1
Give - Currency Switcher: ✔ Licensed – by GiveWP – 2.1.0
Give - Donation Modules for Divi: Free addon – by GiveWP – 2.0.0
Give - Email Reports: ✔ Licensed – by GiveWP – 1.1.4
Give - Fee Recovery: ✔ Licensed – by GiveWP – 2.3.3
Give - Form Field Manager: ✔ Licensed – by GiveWP – 3.0.5
Give - Funds and Designations: ✔ Licensed – by GiveWP – 2.0.1
Give - Manual Donations: ✔ Licensed – by GiveWP – 1.7.0
Give - PDF Receipts: ✔ Licensed – by GiveWP – 3.2.1
Give - Recurring Donations: ✔ Licensed – by GiveWP – 2.9.0
Give - Stripe Gateway: ✔ Licensed – by GiveWP – 2.6.0
Give - Text-to-Give: ✔ Licensed – by GiveWP – 1.0.3
Give - Tributes: ✔ Licensed – by GiveWP – 2.2.0
Acceptance Criteria
The text was updated successfully, but these errors were encountered: