• Resolved ewd910

    (@ewd910)


    Hi, we’re adding a coblocks form to our site, but upon testing it we keep getting this error –
    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /wp-content/plugins/coblocks/includes/class-coblocks-form.php:896 Stack trace: #0 /wp-content/plugins/coblocks/includes/class-coblocks-form.php(166): CoBlocks_Form->process_form_submission(Array) #1 /wp-includes/class-wp-block.php(258): CoBlocks_Form->coblocks_render_coblocks_form_block(Array, '\n
    We are using the latest version of wordpress and the latest version of coblocks, running on PHP 8.1

    • This topic was modified 1 year, 7 months ago by ewd910.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Anthony Ledesma

    (@paranoia1906)

    Hi @ewd910,

    That is not good to hear! We have the Form block tested with the latest version of WP as well as PHP 8.1 so I am very surprised to hear about this. I will take a look and see if I can track down why that is happening on the plugin side of things.

    Best,

    Plugin Author Anthony Ledesma

    (@paranoia1906)

    Hi @ewd910,

    Are you able to provide additional information regarding the Form error you posted earlier today? We have had a few of our engineers attempt to replicate this error without success. Any extra information like debug logs, or other plugins for example I would greatly appreciate.

    Best,

    Plugin Author Anthony Ledesma

    (@paranoia1906)

    @ewd910,

    I realize also that you may have added additional blocks to your form. Can you identify all the blocks in the form for us please? A screenshot would really help also if you can provide.

    Thread Starter ewd910

    (@ewd910)

    Hi @paranoia1906 , there are no additional blocks in the form, It’s a pretty simple form. Now there is no fatal error but the form doesn’t submit and the email is not sent to the recipient address. Here is a screenshot of the form
    https://imgur.com/QzaG1Hu


    Plugin Author Anthony Ledesma

    (@paranoia1906)

    Hi @ewd910,

    Okay, that is good to hear about the configuration thank you for the clarification. We spotted a condition in the code that may have caused the issue you were seeing. Do you mind updating to the latest version of CoBlocks to test the issue again? We suspect the 3.1.2 version could resolve your issue.

    Best,

    Thread Starter ewd910

    (@ewd910)

    Hi again, we are already testing on 3.1.2, this resolves the fatal error but does not submit the form.

    Plugin Author Anthony Ledesma

    (@paranoia1906)

    We have confirmed the successful sending of our forms in our tests. The form functionality itself uses the wp_mail functionality to send mail. Essentially there is no custom configuration to send an email with the CoBlocks Form block, instead the Form block uses the built-in methods that WordPress has.

    That said, it could be something with the email address set. View the screenshot below to see what I mean, there is an option to set the receiving email address.

    It is also possible that the hosting provider is having some deliverability issues around sending to a specific email box. One example is that most shared hosting providers use shared email servers. A mail server can be impacted by bad actors, which then affect all of the users on the shared server/email server.

    I do not know if that is the case, but it seems likely that there may be a deliverability issue occurring. I would recommend contacting your host and see if they can identify where the email is going. Another way to test if it is deliverable would be to use a separate email address altogether and see if it delivers as expected. For example, if you have a gmail address, using a yahoo email the address would be a different domain that may not have the deliverability issue.

    Thread Starter ewd910

    (@ewd910)

    Hi, thanks for the help, turns out that the from address and from name weren’t being set correctly. Works fine after that was resolved

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error on form submission’ is closed to new replies.