pods-framework / pods-gravity-forms

Integration with Gravity Forms plugin for WordPress (https://pods.io/gravityforms/)
https://wordpress.org/plugins/pods-gravity-forms/
GNU General Public License v2.0
62 stars 10 forks source link

Adding a new currency field to an existing template crashes the post #111

Closed BenJackGill closed 6 years ago

BenJackGill commented 6 years ago

Issue Overview

If a new currency custom field is created and referenced in a template after a post has been published, it will crash the page (the post turns white, header still shows).

For example this template will crash the page: [if new_currency_field_added_after_post_creation]Show some stuff[/if]

You have to go and manually "update" each post to fix the crash.

Expected Behavior

Since the currency is expected to be blank (e.g. no one has gone into the post and added a value and saved the post) the if statement should evaluate to "false" and not return anything.

Current Behavior

It crashes the post, the entire post turns white (except for the header).

Steps to Reproduce (for bugs)

  1. Create a Pod, a text custom field, and template to display that field.
  2. Create a new post to display your template using a shortcode (example: [pods template="My Template"])
  3. Edit that pod to include a new currency custom field (example: new_currency)
  4. Edit the template from step 1 with an IF statement that references the new field (example: [if new_currency]a[/if])
  5. View the post from step 2 on the front end. Do not view or "update" the post in admin yet. You will see it has crashed - displays a white screen in place of the content.
  6. Now go into that crashed post and click "update". It will come back alive again.
jimtrue commented 6 years ago

@bennygill Did you mean to publish this in the Gravity Forms Add-on Bug report area? I think you meant to create this in Pods: https://github.com/pods-framework/pods/issues/new

BenJackGill commented 6 years ago

Whoops! Yes it was supposed to be over there. I'm new to this. Can we move it over somehow?

BenJackGill commented 6 years ago

@jimtrue should I delete this bug report and resubmit to the correct place?

jimtrue commented 6 years ago

My apologies, yep. I can close this one if you can resubmit to the correct area. That report actually asks for your debug details so that's a better place to resubmit.