Me too.
Notice: Undefined variable: post_id in /wp-content/plugins/gravity-forms-post-updates/gravityforms-update-post.php on line 146
Changing gravityforms-update-post.php line 113 from a blank line to $post_id = false; resolved the issue for me.
I also got this WP_DEBUG message at time of clicking Submit button on a form:
Notice: Undefined index: post_content in /wp-content/plugins/gravity-forms-post-updates/gravityforms-update-post.php on line 1150
I resolved it by changing line 1150 from this:
if (! $post_data['post_content'] ) {
to this:
if (isset($post_data['post_content']) && ! $post_data['post_content'] ) {
That’s how I’d solved the first issue. Hadn’t got to the second but thanks on the heads-up Clifford. Well done.
I had been seeing the 1st error consistently. Then all of a sudden I noticed the 2nd. If I remember correctly, I think it’s upon submitting a form, which could easily be missed on a long form (appears at bottom I think, maybe at top of form) and appears just for a flash if page reloads or Ajax. Sorry can’t remember all the details, but it was appearing consistently.
Ok Clifford – I’ll look out for it
Thanks
Updated in the new version.
Thanks for updating with this fix.
You should also change the “Compatible up to: 4.1.5” to the current WP version to avoid the scary “Warning: This plugin has not been tested with your current version of WordPress” message.
Another one appeared above where displaying the form (i.e. updating a post):
Notice: Undefined index: conditional in /wp-content/plugins/gravity-forms-post-updates/gravityforms-update-post.php on line 935
Clifford
I did a temporary fix by changing the condition of the if statement on that line from
if (! $form['conditional'] ) { to
if (empty($form['conditional'] )) {
as this seems to be the gist of what is being queried.
There are other lines giving warnings and I think these happen when loading a form with empty fields.
Sorry for the late response. Yup, that fixed the issue of the WP_DEBUG message flashing at the bottom of the screen/submit button when updating a post.
tyvm! π
I added this into the latest version. Thanks for highlighting it.