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 topic contains 12 replies, has 2 voices.

Last updated by jan-willemK 1 year ago.

Assigned support staff: Diego Pereira.

Author Posts
August 31, 2018 at 1:22 pm #2693836

jan-willemK

I am trying to: Just view all uploaded media in the Media Section. I'm using WP Media Folder from JoomUnited which allows for folder management of Media. With this turned off I can show "All languages" for media. But with this turned on I can only show my selected languages. Splitting my Media uploads in half. I just want an option to view all media all the time and not translate these attachments.

I expected to see: All my media attachments when looking at Media in the CMS

Instead, I got: Only the attachments uploaded to the currently selected language. I know there is a setting to go through all attachments and make duplicate records. But trying this results in an admin_ajax.php call that gets a 400 error. And even if this DID work, I wouldn't want this. I don't need duplicate records, I just want all media to show untranslated site wide.

This was the default before. How can I get this back without downgrading WPML?

August 31, 2018 at 2:01 pm #2693961

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @jan-willemk, welcome to the WPML support Forum!

We moved most of the logic from Media Translation to WPML Core, the main purpose of Media Translation is to allow to choose replacement images when you’re translating with WPML’s Translation Management. Please take a look at this link: https://wpml.org/pt-br/2018/06/important-changes-in-how-media-translation-works-since-wpml-4-0/

Basically, to revert to the way it worked before, you just need to disable the WPML Media Translator.

If you need more help just let me know.

All the best,
Diego

August 31, 2018 at 2:48 pm #2694316

jan-willemK

Thanks for you response. Yes I need more help. HOW do I disable the WPML Media Translator?
Unchecking all the boxes and clicking apply results in the mentioned 400 error like so in the console:
/wp-admin/admin-ajax.php:1 Failed to load resource: the server responded with a status of 400 ()

This happens when posting the wpml_media_set_content_prepare action to admin-ajax. No errors in the PHP error log on the server. So it must be a bad request somehow.

Can I manually set these options in the DB or what can I do?

August 31, 2018 at 8:43 pm #2695039

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

You need to go to Plugins > All Plugins and deactivate the WPML Media extension.

Please let me know if it worked for you.

Regards,
Diego

August 31, 2018 at 9:24 pm #2695071

jan-willemK

I only have wpml installed

September 2, 2018 at 3:52 pm #2697182

jan-willemK

I looked all through the settings but can't find a way to disable it. You mentioned it was moved to core. I don't have the WPML Media Extension installed, only the main plugin. So, how/where do I disable this functionality?

September 3, 2018 at 10:58 am #2698812

jan-willemK

Is there any update? Is there something I can try or test to get my WPML setup back to how it was?

September 3, 2018 at 11:57 am #2699129

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

With WPML Media disabled, it should display the same images in all languages. As you said, with the plugin disabled, it works normally. So I think it's a compatibility issue with the WP Media Folder plugin (which is not listed in our list of compatible plugins: https://wpml.org/documentation/plugins-compatibility/)

I can create a clean installation of WordPress to test the plugin and if necessary forward it to our compatibility team, which will contact the author to implement compatibility with WPML. If you want, just let me know, I'll create a test website.

Regards,
Diego

September 3, 2018 at 12:03 pm #2699134

jan-willemK

I'm not sure I've actually "Disabled WPML Media Translation" as I don't think there is an option to do so. Can you confirm?

I think it is smart maybe to have developers test compatibility. I can provide the plugin code if you want? Let me know where to send it to.

I have also created a support ticket with the Plugin developers and they said they fixed compatibility on their end but I can't confirm this. I don't know what they changed but my problem still persists.

So if you want to, please go ahead and set up the test site to confirm compatibility.

September 3, 2018 at 8:01 pm #2700866

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

To deactivate you need to go to Plugins > All Plugins and deactivate the WPML Media extension.

I created a test website with a clean WordPress install. You can access it through this link:
hidden link Through this link you will be automatically logged in.

Please upload the plugin to this test install and setup it the same way as in your website (using the same options). Please note that we only need the plugin and the related functionality, you don't need to setup a entire website or clone your existing site.

Regards,
Diego

September 3, 2018 at 9:32 pm #2700970

jan-willemK

Okay that is smart! Thanks for the effort.

This is what i've done.

1. Configured WPML with 2 languages
2. Added the WP Media Folder plugin
3. Set Media (attachment) to be non-translatable
4. Disabled any "Media Translation" settings I could find
5. Uploaded a test image to Media

Now this is what I've noticed:

1. The error is present, the test image only shows up when the English is selected in the Admin Bar, and it's gone when Dutch is selected. This is NOT the desired situation.
2. I can apply the settings on this sandbox site, and I'm not getting the admin-ajax.php error mentioned in a previous message. However this doesn't change anything in relation to my issue.

Just for clarity:
I still think there is some noise in our communication. You mentioned a couple of time that the Media translation can/should be disabled by going to Plugins -> All Plugins and disabling it there. But in a previous message you mentioned this logic was recently moved to core. Just for clarity: I was never using the WPML Media Translation plugin. I have no desire to translate media (which is where this issue even started). But this move to core makes it so, that I can't seem to disable Media Translation at all. So, this is NOT a matter of disabling the WPML Media Translation plugin as I have never used it. It is a matter of disabling this functionality in the main WPML plugin, or solving the issue otherwise.

September 4, 2018 at 5:16 pm #2704201

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thanks! I have checked the issue on the test website.The "Media" post type must be set to "Translatable" by default. Maybe this is generating the errors on your website.

I was able to fix it on the test website using the steps below:
- Go to WPML > Settings > Post Types Translation, set the Media post type to Translatable - only show translated items and save
- Scroll down to Media Translation, select the " Translate existing media in all languages" and click on start
- On How to handle media for new content, select the When uploading media to the Media library, make it available in all languages option and click on apply.

Now all uploaded and new images should display on both languages. You can check here:
hidden link

If you need more help just let me know.

All the best,
Diego

September 7, 2018 at 8:36 am #2713798

jan-willemK

Thanks for your help! 😀

It turns out that, yes, this entire issue was because WMPL expects the Attachments post type to be translatable.

I'm still kinda confused by this move to core. Would have loved to just disable Media translation all together. But following your instructions I did end up with the desired situations. My media files now show up correctly on both languages.

As a small tip to the developers, maybe give a notice back to a user when clicking Apply/Start in the Media Translation settings. Because when Attachment translation is disabled, it just fails silently on the admin-ajax 400 error.