Skip Navigation

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

Problem:
The client is using ACF Pro with a Gallery field set to 'Hide from library', which works correctly in the primary language by hiding images from the WP Media Library. However, in the secondary language (Swedish), the images are still visible in the media library.
Solution:
We first clarified that the 'Hide from library' feature might be misunderstood as it is intended to limit file selection to those uploaded to the post, not hide them from the Media Library entirely. We also identified that the 'Frontend Admin' plugin, which is not compatible with WPML, might be causing the issue. We recommended contacting the plugin author to request compatibility with WPML through our Go Global program (https://wpml.org/documentation/support/go-global-program/).

If this solution does not resolve your issue or seems irrelevant, we highly recommend checking related known issues (https://wpml.org/known-issues/), verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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 0.37 hours from now. Thank you for your understanding.

This topic contains 8 replies, has 2 voices.

Last updated by Long Nguyen 3 months, 1 week ago.

Assisted by: Long Nguyen.

Author Posts
May 30, 2024 at 7:04 pm #15689878

babakB

Hi!

I use ACF pro with a Gallery field for my CPT. THere is an option called Hide from library that I have set to on. This option attaches the image to the custom post type but hides it from the WP Media library.

This only works for the primary language though. The image is still visible in the media library of the secondary language.

I think this is a bug.

With best regards,

b

May 31, 2024 at 2:40 am #15690386

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Babak,

Thank you for contacting WPML support, I’m happy to help you with this issue.

I understand the issue here is the image is uploaded to the original post and it is available when editing the translation post in the Media Library.

First thing, I think you are using the WordPress editor to translate the post and custom fields manually.
The second, I see that:
1. When editing the translation post, only the image uploaded to the original post is available in the Media Library.
2. The images uploaded to other posts are not available there.

So I think it is expected to share the same images across languages of a post and its translation.

If it isn't your case, can you please try to replicate the issue on the sandbox site? You can access the admin area directly with this link
hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Looking forward to your reply.
Thanks

Edit Post “WPML test post en” ‹ WPML — WordPress 2024-05-31 09-37-39.jpg
June 4, 2024 at 9:55 am #15700933

babakB

I don't think you have understood my problem.

In ACF, there is an option where you can hide all images attached to a custom post type from the media library. This option you can find in the Gallery field: "Hide from library
Files will not appear in the WP library".

When you set this to on the images uploaded to a new custom post type will not appear in the media library. This is good if you have a function where users can add new custom post types with images and you don't want them to flood your media library.

When I set the option to on the uploaded image is not attached in the english (primary language) media library. When I check the media library in the secondary language (Swedish) the images are there, they are not hidden as they should be.

The custom post typ is set to not translatable as it should be set in my system for other functions to work.

What I expect is that I shouldn't be able to see uploaded images for my custom post type in the media library.

Because it's working as it should in the primary language but doesn't work in the secondary language I assume there is some setting or other issue with WPML that I need to address.

June 5, 2024 at 1:50 am #15704650

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I'm using ACF Pro latest version 6.3.1 and don't see the option "Hide from library Files will not appear in the WP library". Please check the attached screenshot on the sandbox site.
I also cannot find that option in the ACF documentation hidden link

It only said: "Limits file selection to only those that have been uploaded to this post, or the entire library."

That means you can select the file uploaded to the post only. It doesn't mean preventing showing the uploaded image in the Media Library.

Can you please help me replicate the issue on the sandbox site that I shared above and some screenshots of this?
hidden link

Thanks for your co-operation.

Add New Field Group ‹ Sandbox — WordPress 2024-06-05 08-39-33.png
June 13, 2024 at 6:49 pm #15737617

babakB

Hi!

The sandbox link has expired. I will attach a screenshot that shows these options for my gallery field.

ACF Custom directory.jpg
June 13, 2024 at 6:53 pm #15737633

babakB

You need to activate the option "Custom Directory"

June 14, 2024 at 3:37 am #15738135

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I don't see the option "Custom Directory" when using the Gallery field of ACF or in their documentation hidden link

Is this from a third-party plugin or a custom code?

The sandbox site will expire after a week from the last access. If you want to try on another sandbox site, please click on this link
hidden link

Looking forward to your reply.
Thanks

June 15, 2024 at 10:31 pm #15742106

babakB

Hi!

I'm sorry, it was a feature of another plugin (Frontend admin) that I've instelled on the sandbox.

/b

June 17, 2024 at 2:56 am #15743150

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The plugin "Frontend Admin" isn't available in our list of compatible plugins (https://wpml.org/plugin/) so you might experience some issues when using this plugin and WPML.
I suggest you contact the plugin author and ask them to join our Go Global program where our Compatibility developers will help them to make their product compatible with WPML.
https://wpml.org/documentation/support/go-global-program/

Thanks.

June 23, 2024 at 8:31 pm #15797707

babakB

Will ask Andreas W instead. If things are not 100% supported he always helps with a workaround.

babakB confirmed that the issue was resolved on 2024-06-23 20:31:57.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.