Skip Navigation

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.

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by Itamar 1 year ago.

Assigned support staff: Itamar.

Author Posts
November 6, 2017 at 5:29 pm

nicolasF-19

Hi,

I'm using gravity form and a field for multiple files upload. But when uploading the files, I get this error message:
"Error: -200, Message: HTTP Error., File: Checklist_Refonte_site.pdf"

url website : hidden link
screenshot error : hidden link

If I deactivate WPML, it's working just fine and the files are uploaded (I also tested the theme = OK and other plugins = OK)

Remark:
- if you use duplicator package, you will have to modify the file "lang.php" (redirection for language)
- feedback from Gravityform support: "The multi-file uploader uses an ajax request before submission, that ajax request (POST) is what is being blocked."

Thanks in advance for your support

November 7, 2017 at 7:28 pm #1423740

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can see the problem on your site, but I do not see the error message that you are talking about. I get this message when trying to upload a few files to your site. Please see attached screenshot.
Please tell me where I can see the error that you are mentioning?
Also, and very important, you are using an older version of WordPress. Please update WordPress to its latest version and see if the problem persists.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

If you still need help from me, please create a Duplicator package without the uploads folder or any other heavy files to make the package lighter. The one that you have now takes a lot of time to download because it is very big.

Regards,
Itamar.

November 8, 2017 at 3:19 pm #1424765

nicolasF-19

Hi

I have updated the version of WordPress (and WPML plugins) on another copy of my website in order to test your suggestion (my client is currently working on the content of the main version)

This doesn't solve the issue.

I made this short video to demonstrate the steps I'm doing and that lead to the issue: hidden link

- Updated version of WordPress
- test in Chrome & Mozilla with WPML activated --> The form multi-files upload doesn't work
- test in Chrome & Mozilla WITHOUT WPML activated --> The form multi-files upload works

As mentioned before, according to Gravity form support, "The multi-file uploader uses an ajax request before submission, that ajax request (POST) is what is being blocked." Hope it helps?

As requested, I also made a lighter version of the duplicator file (72MB). **When you install it, please modify the file "lang.php" (redirection for language) to match your url. **

Thanks in advance for your support

November 9, 2017 at 5:42 pm #1426370

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Please try the following.
1. Go to WPML -> Languages.
2. Under 'Language filtering for AJAX operations' select the option 'Store a language cookie to support language filtering for AJAX' and save.
Please see attached screenshot.
Does this solve the problem?

November 9, 2017 at 6:29 pm #1426432

nicolasF-19

Hi,

This doesn't solve the issue.

In the console of Chrome, I noticed this error line when I'm trying to upload a file :

VM591:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at Function.parse (<anonymous>)
at o.Uploader.<anonymous> (gravityforms.min.js?ver=2.2.5:1)
at o.Uploader.dispatchEvent (plupload.full.min.js?ver=2.1.8:29)
at o.Uploader.trigger (plupload.full.min.js?ver=2.1.8:13)
at f.m.onload (plupload.full.min.js?ver=2.1.8:29)
at f.<anonymous> (plupload.full.min.js?ver=2.1.8:13)
at Array.<anonymous> (plupload.full.min.js?ver=2.1.8:13)
at i (plupload.full.min.js?ver=2.1.8:13)
at Object.r [as inSeries] (plupload.full.min.js?ver=2.1.8:13)
at f.dispatchEvent (plupload.full.min.js?ver=2.1.8:13)

etc.

This error message disappear when I deactivate WPML.

Thanks in advance for the follow-up

November 12, 2017 at 9:55 pm #1428382

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've debugged this issue on my local server and found out that this issue is only happening when you choose in WPML -> Languages the option 'Use directory for default language' as you chose.
Can you, please confirm that if you uncheck this option on your site (you'll need to re-save permalinks) the problem persists?

November 14, 2017 at 5:21 pm #1430490

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can reproduce this problem on a clean WordPress installation.
This issue is somewhat similar to another reported problem in our forum which you can see here.
https://wpml.org/forums/topic/gravity-forms-file-upload-not-working-on-translated-versions-of-the-site/
The fix in this ticket does not help in this case and maybe needs some adjustments.
I'm escalating this ticket to our compatibility team, and they will try to find a solution for this issue.

I'll keep you informed here on any news.

Thanks,
Itamar.

November 15, 2017 at 6:24 pm #1431811

nicolasF-19

Hi,

Ok, thanks for keeping me informed. When could we expect a feedback from the compatibility team? (for my project management)

Thanks

Jonathan

November 15, 2017 at 7:24 pm #1431865

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jonathan.

I can't say exactly when but we should be in the next few days.

November 22, 2017 at 2:26 pm #1438246

nicolasF-19

Hi Itamar,

Did the compatibility team come up with a solution for my issue in the last 7 days?

Thanks in advance,

Jonathan

November 23, 2017 at 1:08 pm #1439300

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I'm sorry, but still, I have no news about it.
I've just left a message with our compatibility team asking about any progress.
I'll keep you informed here.

Thanks,
Itamar.

November 26, 2017 at 4:41 pm #1441682

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jonathan.

Our third tier supporter has debugged this issue. He can also recognize this problem. When using an HTML file as a root page, this problem with Gravity forums' multi-files upload filed happens. The issue is now escalated to our developers to fix it.
Meanwhile please consider not using an HTML file for a root page, but a native page that is coming from WordPress. This will fix the issue.

I'll keep you updated here when our developers will release a fix for this issue.

Best regards,
Itamar.

December 1, 2017 at 1:40 pm #1446978

nicolasF-19

Hi Itamar,

Can you please tell me how I can replace my current setting (html file with a php redirect) with a native page while keeping the same url structure for my default language (english : mysite.com/en/ for homepage) ?

THanks in advance,

Best,

Jonathan

December 3, 2017 at 10:28 am #1447820

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jonathan.

In our documentation about 'Language Directory for the Default Language' we explain how to use a WordPress page for the root homepage when using this option. If you have not read this documentation yet, please read it in the following link and specifically look under the title 'Selecting a WordPress page'.
https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

When choosing the 'Use directory for default language option' option the default language (English in your case) will be placed in a folder (only virtually) and will appear like any of the other languages for your site's users. The main domain of your site (mysite.com) will be used to display general content or knowladge about your site in a few languages if you want. You can also place a Language Switcher on this page to let the users chose their preferred language. For this, you need to specify an HTML file or a WordPress page.

Now, you also mention a redirection (which seems to be counter-intuitive for this option), and I'm not sure about the purpose of it, so please explain what you mean or need.

Thanks,
Itamar.

December 21, 2017 at 3:29 pm #1463840

nicolasF-19

Hi Itamar,

I had already read your documentation (https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/)

We didn't want to have a "root page" but that the visitor directly lands on the default language homepage.

That's why I found on WPML forum the suggestion by one of your admin to use the option with an HTML file and refer to a php file (in my case "lang.php"). Content of the php :

<?php
header( 'Location: hidden link' ) ;
?>

That's what I meant when I talked about a "redirection". It sends to my homepage with default language (en)

So I need a similar behavior (and not an additional (root) page)

Thanks in advance

Best,

Jonathan