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.

Our next available supporter will start replying to tickets in about 4.23 hours from now. Thank you for your understanding.

This topic contains 73 replies, has 2 voices.

Last updated by berryP-2 11 months, 3 weeks ago.

Assigned support staff: Carlos Rojas.

Author Posts
August 14, 2018 at 5:21 pm #2644127

berryP-2

I ran into the issue of 4.0.4 and had all my galleries stop working in other languages.

I wasn't aware the situation was plugin related and I debugged a lot... I deleted all my posts/media (since site is still under development).

I updated to 4.0.5 and wanted to make sure no media got duplicated but I can't deselect any settings for existing media.

Now I went back to 4.0.3 and I want to make sure what the proper steps are to avoid any media being duplicated, since I can't seem to deselect that setting.

Or should I just update to 4.0.5 and reset all settings ?

August 15, 2018 at 2:43 am #2645086

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting WPML support.

This settings are selecte by default. I recommend you to follow this steps:
- Back up your site first before making any change, this is for security reasons.
- Deselect the duplication options -> Click Start button.
- Check if the media elements weren't duplicated -as you previously set-.
- Upload a new media element -> Check if it gets duplicated.

If the media element you uploaded in the last steps doesn't get duplicated then you only need to make sure not click on the 'Start' button with the duplication options selected.

Please let me know if you need further assistance.
Kind regards,
Carlos

August 17, 2018 at 12:38 am #2651684

berryP-2

Thanks for the answer... I get it.

I reset the entire site and started from scratch with content.
I just re-activated WPML, set it up how I want it and I tried to upload a photo through the basic file uploader from ACF.

The image gets uploaded and shown (on the front), I can also see the post and post_meta data in the database but it doesn't show in the Media gallery.

Is this something that is a known bug ?

I tested with/without WPML active. Without the plugin, it works as expected, with the plugin active, no entry shows in the Gallery admin.

You can see in the attached screenshot, the entry exists in the database, but not in the media gallery.

silhouette-woman is the last one visible in the Gallery, whereas this should be a test image for Abraham Lincoln.

If I deactivate WPML (after the image is uploaded), it shows again in the Gallery.

August 17, 2018 at 12:48 am #2651704

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

I would like to ask you to follow this steps:
- Create a full backup of the site for security reasons before making any change.
- Install Advanced Custom Fields Multilingual plugin (https://wpml.org/account/downloads/)
- Go to Media Library -> Check if the images appear (please switch languages in the admin menu if necessary).

Does the issue persists?

Best regards,
Carlos

August 17, 2018 at 12:49 am #2651705

berryP-2

Why do I need this plugin ? I don't want to translate ACF. I never had the need for it.

August 17, 2018 at 1:11 am #2651730

berryP-2

I mean, I never needed it. Everything in the acf front-end form (labels, instructions, etc) is translated through a .po file.

FYI: I have media set as non-translatable, like acf-field-group.

August 17, 2018 at 1:20 am #2651733

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you very much for your answer.

Could you provide a download link with a copy of the site? This way I will be able to reproduce this issue in a local environment and try to find it's cause.

I rcommend you to use Duplicator plugin to make the copy of the site. Please remember to share the installer.php file too.

I have set your next answer private where you will find the correspondent field to provide the download link.

Best regards,
Carlos

August 17, 2018 at 7:03 am #2652393

berryP-2

Can you please explain why I should install this plugin ? I never needed this before.

I can not give you a copy of the site. I can show you certain pieces upon request, but not the entire site.

August 17, 2018 at 4:02 pm #2653792

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,

This ‘glue’ plugin makes it easier to translate with WPML content provided in fields created with Advanced Custom Fields. I understand that you don't want to translate this fields, but I think this plugin may add the necesary filters in the code to show the media elements in the library while WPML is active.

As you can share a copy of the site. I kindly ask you to provide the steps to reproduce the issue in a fresh new WordPress install. This way I will be able to take a closer look at the issue and try to isolate it's cause.

Thank you very much for your understanding!
Best regards,
Carlos

August 17, 2018 at 4:03 pm #2653797

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

You can find more information about ACFML plugin in the following link: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Best regards,
Carlos

August 17, 2018 at 5:45 pm #2654426

berryP-2

I have looked at the plugin and its code. I'm sorry, but I don't see how this plugin would help me and you don't have a valid reason why I should. I do not want to translate any ACF fields or groups, so I don't see what this plugin would offer extra.

I have media set to non-translatable.
I have the setting "When uploading media to the Media library, make it available in all languages" checked, the rest is unchecked.

I have debugged the hell out of it, with several versions. WPML is the culprit no doubt. With 4.0.3 it was no problem, after that I can't seem to get it working properly.

I can not test this out on a clean WordPress install, because of the advanced state of the project. I've been working on it for over 1,5 years. There's too much code involved to be able to move it to a default theme.

August 17, 2018 at 6:43 pm #2654490

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

I understand. Could you provide the steps to reproduce the issue?

Best regards,
Carlos

August 17, 2018 at 7:22 pm #2654577

berryP-2

Of course...

I am building a site where you can create a (custom post type) profile, set to "use translation if available or fallback to default language".

This profile consists for 99% out of preset values like selects, checkboxes and radio buttons, which I translate through a .po file (since that's a lot faster because they won't change).

This form which has both a basic and 'normal' wp uploader. Basic for a single profile photo, normal for a gallery.

Without WPML it works as expected.

If I activate 4.0.3 and upload any photos, they are visible in the media library, on the post itself and on the 'translated' version, which is basically the english version where all the labels/values are translated through the aforementioned .po file.

I then remove the post, and update to 4.0.5.
I then get the notice "WPML needs to set languages to existing media in your site.". I uncheck both duplicate media options and click save.
I then get a 400 bad request on /cms/wp-admin/admin-ajax.php (on line 1).

I then put back an SQL database which I saved just before I activated WPML the first time (in that database).

I then install 4.0.5 from scratch.
I set it up, I get the notice again,uncheck the duplicates and click save.
Again I get the 400 bad request on /cms/wp-admin/admin-ajax.php (on line 1).

So I can't store this setting. I can upload photos, but as mentioned before, they don't show now in the media gallery.

August 18, 2018 at 4:50 pm #2656215

berryP-2

I might have found a work-around, but it requires more testing...
Since I can't store the setting in 4.0.5 due to the ajax error, I decided to first install 4.0.3 then upgrade to 4.0.4, save the setting and then update to 4.0.5.

It looks like this is working, but as I said, needs more testing/investigating.

August 19, 2018 at 4:00 pm #2657408

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,

I'm glad to hear that updating the WPML plugins bersion by version is working. However I suspect this error is caused by a missig file or an interaction issue with a third party plugin/theme.

I kindly as you to create/edit/upload mroe images as a test and let me know if the issue disappeared.

I also recommend you to follow this steps:
- Create a backup of the site's database.
- Go to WPML -> Support -> Troubleshooting links -> Click on the buttons:
-- Remove ghost entries from the translation tables
-- Fix element_type collation
-- Set language information

Looking forward to your answer.
Best regards,
Carlos