Open marklchaves opened 2 weeks ago
So the Gravity Forms, Ninja Forms, and CF7 Close Popup and Open Popup settings are actually deprecated!
All those settings were deprecated a few years back. We'll be removing the code for them in an upcoming release. We'll also update the docs.
For now, customers should use
Popup Maker > Popup Settings > Close > Form Submission > Close on Form Submission
Describe the bug
In the Gravity Forms form settings page:
Site information
Popup Maker version: Version 1.20.2
Expected behavior
No errors and settings should save.
Current behavior
Fatal error and settings don't save. See above.
Steps to reproduce
See above.
Errors
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in C:\Users\Kimmy\Local Sites\test-2\app\public\wp-content\plugins\popup-maker\includes\integrations\class-pum-gravity-forms.php:272 Stack trace: #0 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-content\plugins\popup-maker\includes\integrations\class-pum-gravity-forms.php(121): PUM_Gravity_Forms_Integation::save() #1 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\class-wp-hook.php(324): PUM_Gravity_Forms_Integation::render_settings_page('') #2 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #3 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #4 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-content\plugins\gravityforms\form_settings.php(64): do_action('gform_form_sett...') #5 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-content\plugins\gravityforms\gravityforms.php(3953): GFFormSettings::form_settings_page('2') #6 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\class-wp-hook.php(324): GFForms::forms('') #7 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #8 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #9 C:\Users\Kimmy\Local Sites\test-2\app\public\wp-admin\admin.php(259): do_action('toplevel_page_g...') #10 {main} thrown in C:\Users\Kimmy\Local Sites\test-2\app\public\wp-content\plugins\popup-maker\includes\integrations\class-pum-gravity-forms.php on line 272 There has been a critical error on this website. Please check your site admin email inbox for instructions.
Additional context
https://github.com/PopupMaker/Popup-Maker/blob/fd2e94c46b300b60e066e7a3f3c98957f9563463/includes/integrations/class-pum-gravity-forms.php#L269
$settings = sanitize_key( wp_unslash( $_POST['gforms-pum'] ) );
This returns an empty string which causes the fatal errors for the Close Popup and Open Popup Gravity Forms form settings.