This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: contact form not found in popup maker Solution:

"""""""""""""""""" - I made popup theme to be translatable - I also set some of the custom fields to copy (however this may depend on the project, data these fields have and may not be important) - I duplicated the default popup theme - I deactivated WPML editor here and edited the French pop-up translation manually - when I was in the French translation, no theme for the pop-up was selected or available at all, so I assume that this is what triggered the JavaScript error - when I duplicated the pop-up theme, I was able to select it in the French version """""""""""""""""

This topic contains 15 replies, has 2 voices.

Last updated by geoffroyD-7 3 months ago.

Assigned support staff: Bruno Kos.

Author Posts
July 10, 2019 at 7:51 am #4177011

geoffroyD-7

Hello,

I use popupmaker and contact forms 7 to get my forms to appear and I currently encounter an error that I can't explain. Some popups show a message “[contact-form-7 404 "Not Found"]”.
Here’s some context:
- The popup and the contact form 7 form have been translated using WPML
- The popup + form work well in English (main language) and in French as well, but not in Dutch
- The configuration of the popup is correct (correct contact form 7 ID in the popup and correct targeting
- The contact form is “not found” in all the popups I set it to, in Dutch only. I have deleted the contact form and recreated it and the issue is still the same.

I have asked this question to popup maker support and they tell me the following:
Does that same form work on a Dutch page rather than popup? If not you'd likely want to speak with WPML. Honestly even if it does work on a page I'd say they may be more helpful here than we could. We build our functionality based on WP core, their functionality completely changes how WP core operates (to handle translations). As WP core wasn't really optimized to work that way these are really hacks in some cases to overload things.

In this case something is getting overloaded, but I have no clue what.

The answer to their question is: yes. Sometimes the contact form also appears in other popups, I can't reproduce the error intentionnally, nor can I resolve it.

Can you hrelp me with this?

July 10, 2019 at 9:24 am #4177719

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

In a nutshell, is the issue here that the form works properly on all the languages apart from Dutch? If you try adding another language, it working there, or is only Dutch affected for some reason?

Could you perhaps provide some screenshots, given that it says that the site is under development and not available?

Regards,
Bruno Kos

July 10, 2019 at 11:43 am #4179615

geoffroyD-7

Hello,

Thank you for your answer. It is mainly not working on Dutch. I have tried to delete and recreate the contact form in the meantime to see if it was a configuration error, and now it doesn't work on French either.
It does work in English though.

Attached 2 screenshots of what I see when I have the error and when it works.

Let me know if you need more information,
Josephine

July 10, 2019 at 12:17 pm #4180047

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

How about we try to exclude the potential incompatibility issues? I have not found such issues described in any thread or our internal documentation though.

Login: hidden link
Username: demo
Password: EIm8GsO60e9j

I've created clean WordPress sandbox and installed all the required plugins inside. Can you try translating one of the demo forms in the same way you did on your site? That would help us exclude that this is compatibility thing.

Regards,
Bruno Kos

July 10, 2019 at 12:21 pm #4180105

geoffroyD-7

Hello,

I can try to reproduce it in the sandbox but no idea if I can. This happens with one form only, all the other forms are correctly translated into other languages;

That's why i said I can't reproduce the error intentionnally, nor can I resolve it. I have no idea why the error keeps happening only on this specific form.

July 10, 2019 at 1:27 pm #4180755

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

This happens with one form only

What does this form have that other forms don't have? I'm wondering what will happen in the following case:

- If you try to create a new form (translated but some default one, so the one which isn't using all the elements of the broken one)

I'm hoping you get where I am aiming to - maybe there is some element in the form triggering this issue, causing incompatibilities. Or some form setting?

Regards,
Bruno Kos

July 10, 2019 at 1:54 pm #4181007

geoffroyD-7

Hello,

Yes, I do understand. That was what I tried with creating a new contact form, but I got the same issues as before (that spread to FR language as well).

To not exclude a popup maker issue, I tried creating a new popup as well. When I use the new contact form, I get the same issue.

I have compared the forms/popups/translations on the following settings:
Contact forms:
- Form content (same in both CF7 forms, except for a hidden shortode. Removing the shortcode doesn't solve the issue)
- Configuration of the automated email after form submission: identical
- Error messages: identical
- Additional Settings: empty
- Blacklist: identical list
- Redirect settings: Not set
- Popup settings: identical

--> The issue shouldn't comme from the CF7 form.

Popup configuration and settings:
- Popup content: Shortcode to the contact form [contact-form-7 id="9193" title="Call Campaign Manager EN"]. The title wasn't the same as the original one in the form that wasn't functioning. Tried to set the original shortcode (EN shortcode & NL shortcode), did not change the results.
- Triggers: same format, correct pages and section names are set.
- Targeting: both forms target the correct pages
- Display, closed & advanced: same settings in both popups

WPML:
- Multilingual content setup: I have different options there and I don't know why. I attached both screenshots. Can this have something to do with it? How come I don't have the same options for both popups?
- Translations are both marked as "complete" for the popups and the contact forms.

Is there anything else in your opinion that I'm missing?
Do I still need to try to reproduce the issue on the sandox?

Thanks a lot for your time,
Josephine

July 10, 2019 at 2:02 pm #4181119

geoffroyD-7

I also tried to create a new form with all default settings. I just gave it a name, translated it using WPML advanced Editor and placed it inside the popup.

I still receive the error message.

July 10, 2019 at 2:52 pm #4181665

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Let's do the sandbox thing to see where it will take us. Try configuring WPML in the same way it is configured on the site and try creating new form that would have all the fields and options set is the one which does not work. Try not to spend much time on this :).

If it works properly, I will escalate this case to our 2nd tier then for further debugging.

Regards,
Bruno Kos

July 10, 2019 at 3:00 pm #4181823

geoffroyD-7

Hello,

Ok, I will do this. i would need one more thing for you: I use the Advanced Translation Editor and it asks me for a email when I activate it (Error: Api error unprocessable entity: Empty value for email. Please try again in a few minutes. If the problem persists, please contact WPML support.)

Can you activate that as well so that I can recreate something as close as possible to the reality?

Thank you,
Josephine

July 11, 2019 at 7:06 am #4186509

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I apologize about that - here it is, advanced translation editor is now activated.

Regards,
Bruno Kos

July 11, 2019 at 7:29 am #4186655

geoffroyD-7

Hello,

I did the translation and got interesting results. When I translate the page, popup and form, the triggers don't appear in the translation version.

They do appear on my website, so that's not what causes the issue there, but I don't know how to fix it on the sandbox and simply adding them there will make the sandbox different my website, as I didn't need to add them there...

Any suggestions?
I already went back to the translations, they do all appear as "complete".

Josephine

July 11, 2019 at 9:41 am #4188087

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi Josephine,

I can see that this really didn't work on the French translation. However, I was able to get a working through the following methods:
hidden link

- You can see the JavaScript error which was in the French version
- I made popup theme to be translatable
- I also set some of the custom fields to copy (however this may depend on the project, data these fields have and may not be important)
- I duplicated the default popup theme
- I deactivated WPML editor here and edited the French pop-up translation manually
- when I was in the French translation, no theme for the pop-up was selected or available at all, so I assume that this is what triggered the JavaScript error
- when I duplicated the pop-up theme, I was able to select it in the French version

So these would seem to be the steps needed to get this working, as per this:
https://wpml.org/forums/topic/translating-a-popup-and-forms/#post-3120787

Can you tell me if you can try this on your site perhaps? I think that the main thing here is to deactivate WPML editor, translate pop-up themes and see to edit translations directly. Can you also check this (on your site) in the following way:

- only WPML plugins are activated,, along with CF7 plugins, as it will tell us if there is an interaction issue with other plugin
- theme is set to a WordPress default like Twenty Nineteen as it will tell us if there is an interaction issue with your theme

Maybe we should start with that also. Let me know how it goes!

Regards,
Bruno Kos

July 11, 2019 at 2:10 pm #4190741

geoffroyD-7

Hello,

So, straight to the point: I solved my issue! 🙂 The issue came from the fact that I had 2 popups targetting the same button. This was the case only in Dutch, there was no duplicates in English. So, something was messing up the translations (most probable cause is me changing the WPML settings while making my changes. This caused most popups to copy but this one to translate).

I came to this idea while following the steps you provide above. Translating a theme resulted in all of my popups loosing their formatting. This got me thinking: if 2 themes create a bug and make no theme show up at all, maybe 2 triggers have the same effect?

Tricky part was that there were no duplicates in the triggers of the english popups. But there was in the Dutch versions. Deleting them (trash, setting as draft is not enough), making sure to redeliver every translation so that triggers were well translated did the trick. My popup appears now with a form and a translation, showing the right theme.

I want to thank you for all of your help, you really did some great thinking with me and I appreciate it a lot! 🙂

July 11, 2019 at 2:30 pm #4190917

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

The issue came from the fact that I had 2 popups targetting the same button

This would make sense - it would sound like asking the button to open the popup from another language, but since that is not possible, it would render the shortcode only.

The pleasure was also mine :).

Marking this thread as resolved.

Regards,
Bruno Kos