Contact form 7 in custom post

Asked

Viewed 336 times

3

I have contact forms made with the plugin contact form 7 within my site, only that contact forms only work on pages, within posts do not work.

On the contacts page it sends correctly and shows the sent message:

pagina de contatos deu ok

In the single of the portfolio sends the email, but the Loader endlessly running and displays no sent message:

single portfolio erro

The error that occurs:

mensagem de erro

Debugging JS by Chrome I see that it stays in this function in loop all life, only that happens only when the form is inside the single of the post on the page does not give error:

inserir a descrição da imagem aqui

  • Have some plugin or code running only on single.php, maybe comparing html is easy to discover.

2 answers

2

To Official FAQ has an entry for this problem. The most frequent cause is some plugin or theme causing incompatibilities, for example when the plugin or theme adds different versions of libraries used by the plugin.

This entrance in the plugin knowledge base reports exactly the problem you are having and suggests an article with tips on how to find the real cause of the problem.

Basically the first tip is to change the theme and see if it works. If it still doesn’t work, disable all plugins except Contact Form 7. If this solves the problem, re-enable one by one until you find out what the cause is.

Just to give you an idea, this support topic reports a user’s experience with the same problem. In the end, he found that the plugin WP Facebook Open Graph was the cause.

The problem may occur because you may have different widgets in posts single or because some plugin or theme makes distinction using is_singular() or some other internal Wordpress function that checks the type of page being displayed.

Solving the problem is definitely another story. After identifying which plugin or theme is guilty, you would have to identify exactly the root of the problem.

The most common case, as I mentioned, is to have different versions of the same library as jQuery. You can also look in the HTML source and look for this kind of common problem.

Once you have identified the root of the problem, you have to see if there is an easy solution. In the case of duplicate libraries, the first step is to remove one and see if everything still works. If it doesn’t work, some of the plugins will have to be adjusted to work with the different version.

Also check that all plugins are properly updated. Older versions may have incompatibility with newer libraries.

0

Thiago, to debug this you will have to disable all other plugins. So, if it works you will activate one by one until you find out which plugin is giving conflict. If even disabling the plugins continue with the problem, then Contact Form 7 is giving conflict with some Javascript function of your theme. If you can’t solve then switch to another form plugin. Ninja Forms and Caldera are good and free too. Good luck.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.