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

Gravity Forms - Error Saving form #1445

Closed
mrgrt opened this issue Aug 21, 2023 · 3 comments
Closed

Gravity Forms - Error Saving form #1445

mrgrt opened this issue Aug 21, 2023 · 3 comments
Assignees
Labels
Milestone

Comments

@mrgrt
Copy link

mrgrt commented Aug 21, 2023

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

  • Stream plugin version: 3.9.3
  • WordPress version: 6.3
  • PHP version: 8.0
  • Browser: Chrome 115
  • Computer operating system: macOS (Ventura)
@kasparsd
Copy link
Contributor

Thanks for reporting the issue @mrgrt!

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

$this->log(
sprintf(
/* translators: %1$s a form title, %2$s a status (e.g. "Contact Form", "created") */
__( '"%1$s" form %2$s', 'stream' ),
$title,
$is_new ? esc_html__( 'created', 'stream' ) : esc_html__( 'updated', 'stream' )
),
array(
'action' => $is_new,
'id' => $id,
'title' => $title,
),
$id,
'forms',
$is_new ? 'created' : 'updated'
);

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

$message = $data['message'];

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

'summary' => (string) vsprintf( $message, $args ),

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
Copy link
Contributor

ocean90 commented May 3, 2024

Related: #1443

@tharsheblows
Copy link
Contributor

Related: #1489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants