Skip to content Skip to sidebar

Resolved

Reported for: Advanced Custom Fields Multilingual 1.9.0

Resolved in: 1.9.1

Overview of the issue

If you are working with user fields from Advanced Custom Fields, you will notice that you will get a wrong result in secondary languages. This is happening as our latest version of ACFML 1.9.0 is throwing a NULL value for user fields in secondary languages.

Workaround

Our developers are aware of this issue and they are working on it. In the meantime, you can:

  1. Make a full backup of your site before proceeding.
  2. Open /wp-content/plugins/acfml/classes/class-wpml-acf-options-page.php file.
  3. Look for line 254.
  4. Change:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    ) {
        $dl = acf_get_setting('default_language');
         
        if( $cl && $cl !== $dl ) {
             
            $post_id .= '_' . $cl;
             
        }
    }
  5. With:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    ) {
        $dl = acf_get_setting('default_language');
     
        if( $cl && $cl !== $dl ) {
            if ( strpos( $post_id, 'user_' ) === FALSE){
     
            $post_id .= '_' . $cl;
        }
     
        }
    }