Form integration element issues

Hi there

On a site today, every page that had a contact form 7 using the Form Integration element broke. The pages all returned error 500s and on the odd time they loaded, it showed either just the content and no styling or all the JS on the page (header dropdowns, animations) didn’t work.

I tried deactviating all plugins, clearing caches etc etc and when I checked error logs I found:
/home/sites/15a/1/13ad2bbe94/public_html/wp-content/themes/pro/cornerstone/includes/classes/elements/class-element-definition.php(593): x_element_render_form_integration(Array)

I then went and switched the contact forms to just using the shortcode in a content area and it worked a treat. No idea why the form integration was causing it and obviously I’ve fixed it now so I can’t show it but thought I’d flag it in case it happened to anyone else.

Hey @RubberDuckers,

Thanks for reaching out!

I don’t see any known issues with using the Contact Form 7 element that throwing some JS errors. I also tried to replicate your issue on my development website, but I wasn’t able to replicate it. I suspect that this is just a unique issue with your website but we’re glad that you’re able to figure it out.

If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Hey @marc_a - yeah was really odd! All other sites I have that element on its absolutely fine and no issues, was just on this one.
I’ve put it on the staging site where it’s happening too in case you wanted to take a look: https://staging.rebellionmarketing.co.uk/contact/

Hello, @RubberDuckers,

It might be the issue of plugin conflict or a custom code issue. I would suggest you rename the Plugins one by one through the FTP and check if that resolves your issue.
If that does not resolve your issue, I would suggest you add the debug setup in the wp-config.php file to log the errors into the file name debug.log inside the wp-content folder.

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
//SET PHP INI DISPLAY ERROR FALSE
@ini_set( 'display_errors', 0 );

Please find the video that will help you to edit wp-config.php and add the above code: https://www.youtube.com/watch?v=3SDPTafEM8o
Please let us know the errors logged into the debud.log file for further investigation.

Would you mind sharing your admin credential and FTP access to check the back-end settings? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • FTP Access

You can find the Secure Note button at the bottom of your posts.

Thank you.

Thanks @prakash_s - as you can see above, I’d sorted it and already done the standard troubleshooting stuff. Just left it on the staging site in case anyone wanted to see.

Hi @RubberDuckers,

The staging area has an error and it also bests if you could provide us the admin credential so that we can check what’s going on.

Thank you.

Sure thing, I’ve set you up to have a look!

Hi @RubberDuckers,

I have checked your website and didn’t find the issue you mentioned. I have also created a new test page and added the Contact Form 7 through the Form Integration element and it worked perfectly fine. Please find the test page URL in the secure note.

Thanks

Hi, I should’ve said, it’s fine when logged in. Try in an incognito browser and you’ll see!

Hi @RubberDuckers,

I have checked and found the issue in the incognito mode without logging in. I went ahead and delete and re-install the Contact Form 7 and that resolves the issue.

Thanks

Hey @tristup - how odd, I did that previously and it didn’t do anything! Peculiar but thanks for looking

Hi @RubberDuckers,

Glad that we are able to help you.

Thanks

I’m still getting the errors when not logged in, are you guys not?
https://staging.rebellionmarketing.co.uk/contact/

Hi @RubberDuckers,

I have just checked the URL and didn’t find any errors.

Thanks

How about on this page: https://staging.rebellionmarketing.co.uk/services/web-design/
Contact page seems ok but any other with a form (all the services pages and careers page) that uses the form element seems to still give the error

Hi @RubberDuckers,

This is what we see when accessing the link you’ve shared with us. (See the secure note).

Thank you.

Yeah that’s what I see too - it should look like this: https://rebellionmarketing.co.uk/services/web-design/ (the live site, which I fixed by removing the form integration element and putting the CF7 snippet directly into a raw content element.

Hello @RubberDuckers,

I suspect that this is a conflict between the CF7 and Form Integration when using PHP 8.0. This issue does not occur in our testing servers using PHP 7.4. Can you please downgrade your PHP version to 7.4 so that we can check this on your site?

Kindly let us know how it goes.

Hi @ruenel, changing it to 8.0 was something I did after the error started to see if it fixed it. It was 7.4 before and was happening too. I’ll switch it back anyway

Hey @RubberDuckers,

Now that the PHP version is 7.4, the Form Integration element with Contact Form 7 is now working.

Please check your contact us page again.