xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
405 stars 119 forks source link

Gravity Forms - Error Saving form #1445

Open mrgrt opened 10 months ago

mrgrt commented 10 months ago

Bug Report

Expected Behavior

Save Gravity form without any errors.

Actual Behavior

Save Gravity Form and get an error "There was an error saving your form. To avoid losing your work, click the Save button to save your form and reload the page."

Screenshot 2023-08-21 at 09 01 30

Steps to Reproduce the Problem

  1. Go to Gravity Form
  2. Hit Save to update the form
  3. Error shows
  4. We have deactivated all other plugins except stream and gravity forms and switched to a default theme.

Screenshots/Error logs

1214385e-3d07-11ee-a417-ae828adb7371

System Information

kasparsd commented 10 months ago

Thanks for reporting the issue @mrgrt!

The problem appears to be caused by the gravity forms save handler here:

https://github.com/xwp/stream/blob/4fb568dcc82bd8a7102e74c2a60fa5cd9493216c/connectors/class-connector-gravityforms.php#L227-L242

setting some expected placeholder data for the $message variable (first argument passed to this method):

https://github.com/xwp/stream/blob/4fb568dcc82bd8a7102e74c2a60fa5cd9493216c/classes/class-connector.php#L170

which is not matching up with the argument list passed to the logger:

https://github.com/xwp/stream/blob/4fb568dcc82bd8a7102e74c2a60fa5cd9493216c/classes/class-log.php#L139

Could it be that your form name or any of the data contains the % character? Could you please share the exact form setup to help replicate the issue?

ocean90 commented 2 months ago

Related: https://github.com/xwp/stream/issues/1443