Resolved
Resolved in: 4.0.0
Overview of the issue
Submitting the form in the secondary language fails. This producess the below console error:
xxxxx/wp-json?lang=es/contact-form-7/v1/contact-forms/XXX/feedback 404 (Not Found)
This issue occurs only when setting the language URL format to “Language name added as a parameter“.
Workaround
Add this code to the theme’s functions.php file, found in the ../wp-content/themes/theme-name/ folder:
add_filter( 'wpcf7_load_js', '__return_false' );
necesito saber como registrar el plugin multilenguaje-cms.2.3.6
y saber todo desde el inicio
gracias
manager@akener.com
AHernandez
Hola Serafin,
Para hacer preguntas de soporte debes ir a la siguiente dirección:
https://wpml.org/es/forums/forum/soporte-en-espanol/#new-post
Allí podremos atender tus dudas correctamente.
necesito saber como registrar el plugin multilenguaje-cms.2.3.6
y saber todo desde el inicio
gracias
manager@akener.com
AHernandez
Hola Serafín:
Gracias por tu interés. Veo que ya has comprado una suscripción. Aquí puedes encontrar la guía de instalación https://wpml.org/es/documentation-2/guia-de-inicio/
Cualquier otra duda específica puedes preguntar en nuestro foro https://wpml.org/es/forums/forum/soporte-en-espanol/#new-post.
Saludos!
J’ai essayer d’ajouter “add_filter( ‘wpcf7_load_js’, ‘__return_false’ );” dans le fichier “functions.php” j’ai un bug ‘affichage du site complet.
Merci pour votre retour.
Matthieu
Bonjour Matthieu,
Pardon pour ma réponse tardive, je n’avais pas vu votre commentaire.
Pouvez-vous ouvrir un ticket dans notre forum SVP? Nos agents vont vous aider à résoudre ce problème.
Voici le lien vers notre forum : https://wpml.org/fr/forums/forum/assistance-en-francais/
Merci beaucoup,
Marine
Hi!
I’ve added the line of code to my functions.php file but I still get the post error when I try to submit the form in my secondary language. Please help!
Kind regards,
Pieter
Hi Pieter,
Please visit our support forum :https://wpml.org/forums/forum/english-support/
Our support team will be happy to assist you in resolving your issue.
Regards,
Hi
I have several issues on site I’m developing. I can not find any place to create a topic for support?! One of my issues is that contact form 7 is sending on the site but not received.
Thank you
Erik
Hi Erik,
You can open a support ticket here:
https://wpml.org/forums/forum/english-support/
Simply scroll down until you reach the “How can we help you?” section and then click on the “I need help with WPML” button.
I hope this helps 🙂
Great!,
This is worked for like a charm, this was my exactly issue and using the filter as recommended above just fixed my issue =)
Hi Juan,
It is good to know that everything is sorted out now!
Cheers,
perfect it works again 🙂
thanks 😉
Hi Paulius,
Glad to know that everything works 🙂
Regards,
Thank You !!!!!!!!!
It works like a charm!!!!
FANTASTIC!!!
Axl
Hi,
Pleased to know that the issue is resolved!
Regards,
Thanks! Same problem here. Resolved 🙂
Hi,
Glad to know that everything is working now 🙂
Regards,
THANK YOU! WMPL & Support you are awesome!
Hi,
You are most welcome 🙂
Cheers,
Hi,
i have the same problem with the other language, but when i try adding this line
add_filter( ‘wpcf7_load_js’, ‘__return_false’ ); to the function.php of the child theme
the datepicker in the contact form isn’t working anymore.
Hi,
Could you please open a ticket at our support forum. Our support team will be happy to assist you to resolve this issue.
Thank you. This workaround solved my problem too.
WordPress Version 4.8.2
Contact Form 7 Version 4.9
WPML Multilingual CMS Version 3.7.1
Glad to hear that 🙂
It helped to submit the message but I’m now getting this errors on the page:
Notice: WPCF7_ShortcodeManager::get_instance is deprecated since Contact Form 7 version 4.6! Use WPCF7_FormTagsManager::get_instance instead. in /var/www/staging.polishschool.org.au/public_html/wp-content/plugins/contact-form-7/includes/functions.php on line 355
Notice: WPCF7_ShortcodeManager::scan_shortcode is deprecated since Contact Form 7 version 4.6! Use WPCF7_FormTagsManager::scan instead. in /var/www/staging.polishschool.org.au/public_html/wp-content/plugins/contact-form-7/includes/functions.php on line 355
Hi,
Could you please open a ticket at our support forum. Our support team will be happy to assist you to resolve this issue.
hi, added the code as listed, i still have the same problem.
problem: the form is not sent
i added the line of code to the last line. does it make a difference? i am not a coder.
i am using contact form 7 Version: 4.9
thanks
Hi,
Could you please open a ticket at our support forum. Our support team will be happy to assist you to resolve this issue.
The functions.php filter worked for us. Thanks.
Hi,
The functions.php filter worked for us. But now we cannot see the icon loader we had when we submit a form. This is important because it lets the user see that the form is been submitted.
Please your help,
Thanks.
Hi we have other issue as well:
We have a small contact form on our home page at the near bottom (https://actuaria.com.ec) and we try to submit the form, the page redirects to the blog page for some reason we don’t understand (on both languages).
We have disable the code — add_filter( ‘wpcf7_load_js’, ‘__return_false’ ); — until we solve this issue.
Please your help.
Best,
Sergio
Hello Sergio, could you please report that issue in our support forum? Please log into you WPML account first and then you will see a link to open a new ticket. Thank you.
It’s not working here. No changes. The spinner just keeps spinning as before…
Dear Henrik, we can’t provide support in the comments. We need you to open a new ticket in our support forum instead and one of our employees will handle your issue as soon as possible:
https://wpml.org/forums/forum/english-support/#bbp-new-topic
Great.
I is working.
Workaround worked for us, however hope that this will be fixed permanently by WPML.
Hello Stephan,
We are about to release an update of WPML, but I’m afraid it won’t contain the fix.
We need to resolve a conflict between CF7 and WPML when dealing with AJAX calls and languages in the URL.
The proposed workaround might be still the final solution, but we need to investigate if a more elegant fix is possible.
I’ll make sure to have this issue handled in the following release of WPML.
Hi,
I had the same problem. Tried the filter but obviously is something you don’t want because as many have pointed out, it doesn’t let the user know the form has been submitted.
So here’s the solution that worked for me… I found it in another blog:
add_filter('rest_url', function($url) {
$result = preg_match('/(\?.+)\//U', $url, $matches);
if (!$result || !isset($matches[0]) || !isset($matches[1])) {
return $url;
}
$url = str_replace($matches[0], '', $url);
return $url . $matches[1];
});
Add that instead of the filter to your functions.php in your theme. Make sure it’s the functions.php that is being read by your theme (if it’s a child theme or if its’ the actual theme) and it should work.
Hi Ivan,
Thank you for suggesting this solution! We are working on resolving this issue in our next release.
Perfect! This one worked for me!
Hi Ivan, you’re the hero, great!
hi,
the workaround suggested here will not be helpful if you want to use JS on the contact form.
for example i am using google recaptcha that displays ‘i am not a robot’ in the second language. but if i use that filter then JS is disabled and ‘i am not a robot’ goes back to english.
other solution to change parmalink setting to ‘default’ will wreate havoc on my site as all the links are translated to the second language (including contact form) and leaves the whole site in a mess.
i believe this needs to be fixed on WPML part. the original conact form in english is working fine. only the form in second language does not work (arrow keeps spinning) after you press ‘Send’.
there’s some issues with WPML with handling ajax calls. i have another ticket opened for UserPro and that also is about a problem caused by ajax call and WPML not handling that call properly.
thanks in advance for your help WPML.
Hi Dave,
We have fixed that issue already so you can expect this fix in the next release. It was happening because CF 7 was submitting the form to a REST URL and WPML was messing the URL adding the language parameter in the wrong place.
For the workaround, I don’t recommend it, not loading the JS assets may cause troubles like the one you experienced already.
Hopefully that this fix will also solve other problems you are having with Ajax calls.
You can also change the language URL format to directories to solve the issue:
WPML > Languages > Language URL format
Source:
https://wpml.org/forums/topic/contact-form-in-other-language-not-working-wpml/
Thank you!!!
hello wpml,
i have updated WPML to the latest version (which was updated 4 weeks ago – 3.9.4).
but i still have the same issue. the arrow (after submit) button keeps spinning.
please see for yourself:
chinese url: http://cricket.tw/%E8%81%94%E7%BB%9C%E6%96%B9%E5%BC%8F/?lang=zh-hans
english: http://cricket.tw/contact-us/
english version is working fine and i am getting emails.
please suggest.
thanks in advance.
hello Dave,
could you please open a new ticket in our support forum https://wpml.org/forums/forum/english-support/
hello agnes,
i already have a ticket opened here 2 months ago:
https://wpml.org/forums/topic/contact-form-7-send-button-not-working-arrow-keeps-spinning/
thanks
Thanks for the link. I will contact the person and ask about the status.