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: ACFML 1.1 not displaying translation preferences in custom field group in Multisite

Solution: https://wpml.org/forums/topic/acfml-1-1-not-displaying-translation-preferences-in-custom-field-group/#post-3555819

0% of people find this useful.

This topic contains 9 replies, has 4 voices.

Last updated by guillemL 6 months, 1 week ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
March 28, 2019 at 2:36 pm

sandraT-8

The instructions for translating with ACF (https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#making-acf-fields-translatable) the directions state you can set the translation preferences when you create the fields, however, I don't see this option in my filed groups.

I have several repeating fields for the Products field group and don't want to have to check off translate for every field every time I add a new product with new repeating fields.

Plus I need to be able to hand this project off to a client to add content and they will not understand why they need to check off what fields to translate every time they create product or add additional repeating fields.

March 29, 2019 at 3:50 am #3487385

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

It seems like a theme/plugin conflict or a PHP error that is blocking some functionalities and creating such issues, so could you please perform the below steps and let me know if that helps?

Minimal Setup

I can see translation preference working on one of my test sites, so If you disable all non-related WPML plugins, switch to one of the default themes, the problem persists or not?

NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!).

Debugging

1. Please follow the debugging information provided here: http://wpml.org/documentation/support/debugging-wpml/
2. Repeat the action of creating the problem.
3. Copy and paste the contents of debug.log (log file inside the /wp-content/ directory) here for me to see.

Look forward to your reply.

Thanks

March 29, 2019 at 2:35 pm #3492293

sandraT-8

I turned off all plugins except for WPML, ACFML, ACF Pro, changed theme to twentynineteen and still no option in custom fields.

[removed debug info]

April 1, 2019 at 4:03 am #3503793

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The info you provided is debug information not debug.log, could you please Copy and paste the contents of debug.log (log file inside the /wp-content/ directory) here for me to see.

Further, could you also provide us ftp details of your site, I have enabled the private reply for you.

Thanks

April 1, 2019 at 6:50 pm
April 2, 2019 at 12:06 pm #3516911

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am debugging this issue and will respond to you soon.

Thanks

April 3, 2019 at 4:50 am #3522585

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

I can replicate the issue and In order to be better help on this issue, I have escalated this issue to our 2nd tier supporter.

Our 2nd tier supporter will take a look at this issue. Once they provide any feedback, I will get back to you with that feedback here.

Thanks

April 8, 2019 at 9:06 am #3555819

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

This is to inform you that this issue is now escalated to our developers, in the meantime, our 2nd tier supporters have provided a workaround so could you please follow the below steps:

1) Backup your site

2) Login to your FTP

3) Go to wp-content\plugins\acfml\classes\class-wpml-acf.php line no. 36 and replace the following code

private function is_acf_active() {
		$active = false;

		$active_plugins = get_option('active_plugins');

		if ( is_array( $active_plugins ) ) {
			foreach ( $active_plugins as $plugin ) {
				if ( stristr( $plugin, '/acf.php' ) ) {
					$active = true;
					break;
				}
			}
		}

		return $active;

	}

with

private function is_acf_active() {
        $active = false;

        $active_plugins = get_option('active_plugins');
        $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );

        if ( is_array( $active_plugins ) ) {
            foreach ( $active_plugins as $plugin ) {
                if ( stristr( $plugin, '/acf.php' ) ) {
                    $active = true;
                    break;
                }
            }
        }
        if ($active !== true) {
            if ( is_array( $active_sitewide_plugins ) ) {
                foreach ( array_keys($active_sitewide_plugins) as $aplugin ) {
                    if ( stristr( $aplugin, '/acf.php' ) ) {
                        $active = true;
                        break;
                    }
                }
            }
        }
        return $active;

    }

Let me know if this helps.

Thanks

April 8, 2019 at 4:28 pm #3560131

sandraT-8

We added the supplied code and immediately could see the changes in the Custom Fields section. We set the translation preferences, added a new product and all the preferences carried over as expected. We'll do a bigger test using more flexible fields and repeaters to ensure that all the preferences carry over. Hopefully this will appear in the next version of ACFML.

May 22, 2019 at 9:23 am #3863737

desireeD-2

Hi,

I am using ACFML 1.3 (so two versions newer than 1.1), why hasn't this solution been added to the code by now? The file wp-content\plugins\acfml\classes\class-wpml-acf.php still contains the old code, so the translation preferences are still not displayed in custom field groups (in my multi-site install).

Changing the plugin directly might be a temporary workaround, but changes will get lost after every plugin update. So the solution is to change the plugin files after each update?

Sorry, but this is really annoying.

October 3, 2019 at 2:13 pm #4688585

guillemL

Hi,

I'm having the same problem about not seeing translate options to the ACF custom fields.

I'm using the 1.4 and I think the code to check if ACF is activated fails if ACF it's included as a library of theme or plugin. I think a better check could be implemented as suggested in this link:

https://stackoverflow.com/questions/40595832/wordpress-check-if-plugin-is-installed-acf