Gravity forms Illegal string offset with version 2.4.6.15 [RESOLVED]

We have one form created with gravityforms on our main page. It has always worked great and today we have noticed that no one can now submit this form, it cases a crash with error below, and the url gives http://0.0.0.1/?1

web page turns into this:

This site can’t be reached

http://0.0.0.1/?1 is unreachable.
ERR_ADDRESS_UNREACHABLE

In the error log I can see this

[Mon Jul 19 11:30:53.249131 2021] [fcgid:warn] [pid 28587] [client IP:64966] mod_fcgid: stderr: PHP Warning:  Illegal string offset 'type' in /home/DOMAIN/public_html/wp-content/plugins/gravityforms/form_display.php on line 1597, referer: https://DOMAIN/
[Mon Jul 19 11:30:53.249166 2021] [fcgid:warn] [pid 28587] [client IP:64966] mod_fcgid: stderr: PHP Warning:  Illegal string offset 'url' in /home/DOMAIN/public_html/wp-content/plugins/gravityforms/form_display.php on line 1604, referer: https://DOMAIN/
[Mon Jul 19 11:30:53.249169 2021] [fcgid:warn] [pid 28587] [client IP:64966] mod_fcgid: stderr: PHP Warning:  Illegal string offset 'queryString' in /home/DOMAIN/public_html/wp-content/plugins/gravityforms/form_display.php on line 1609, referer: https://DOMAIN/

In WP-admin->forms->system status all looks fine. I cannot confirm if this was after a WP core update or not as we just realized this now.

Anybody else get this error? How can I resolve this?

The IP based URL usually indicates the form confirmation is set to the page type and the selected page has been deleted or the redirect type and the URL is empty.

You’ll need to make sure the form confirmation is configured correctly.

This issue doesn’t occur in versions 2.5 and greater, we added a number of safety checks to ensure that if confirmations are invalid during submission that it will fallback to the default text based message used by new forms.

1 Like

@richardw8k
thanks for the comment. I’m still not sure I understand, but once you mentioned “form confirmation”, I took a look in wp-admin->forms and in the form in question, its settings->confirmations

I can now see this type of error below. If I edit this, it is set to type with no text. I entered text or deleted this I get errors in log files “PHP Warning: Illegal string offset ‘id’” and in WP it just says “There was an issue deleting this confirmation.”

It is strange as this was working before. Any ideas how I can remove this and just create a simple confirmation text on submit? I assume this doesn’t get deleted because of an association in the DB? I’m good with working in the database to fix it if you have any ideas…

also, upgrading to 2.5 means you have to pay for the plugin?

thanks again for your time.

Yes, you will need a valid license in order to obtain the latest updates.

ok thanks @chrishajer
I guess I should not have ended with that questions because it is more important to understand and resolve the error I have for this plugin than the upgrade.

Does anyone have an idea?

this problem is now resolved. I do not know why but the table wp_gf_form_meta had a bad dataset. It was holding two sets and the second set is not formed properly.

| 1 | {“5d1381940c106”:{“id”:“5d1381940c106”,“name”:“Default Confirmation”,“isDefault”:true,“type”:“message”,“message”:“Thanks for contacting us! We will get in touch with you shortly.”,“url”:"",“pageId”:"",“queryString”:""}} |
| 2 | {“6032c66313ae2”:“1”}

I do not know how this happened, but I would sure liek to know…

turned the second set into this and it is now working…

| 2 | {“5d13a380429fb”:{“id”:“5d13a380429fb”,“name”:“Default Confirmation”,“isDefault”:true,“type”:“message”,“message”:“Thanks for contacting us! We will get in touch with you shortly.”,“url”:"",“pageId”:"",“queryString”:""}} |