• Resolved diegootgs

    (@diegootgs)


    Hi there,

    This is Diego form the WPML compatibility team. We would like to report a a compatibility issue we found, and also check compatibility with the new version of ACFML (2.0).

    Do you have an email where we can send you the details?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello Diego!

    Thanks for the feedback!

    I received an access to try the new WPML with ACML 2.0 as a plugin developer (via Dean). But I’m not aware of any compatibility issue or bug report.

    You can post the report here, I’ll take a look.

    Have a nice day!

    Regards.

    Thread Starter diegootgs

    (@diegootgs)

    Hello Konrad, thanks for the feedback. I will add the details of the issue below.

    It was reported here: https://wpml.org/forums/topic/acf-exteded-breaks-label-in-backend/

    Description
    After updating ACFML to 2.0.2, when using ACF Extended Pro plugin, with fields set to be the same for all languages, the ACF field group label appear like this !!__(!!’testtttdasdf!!’, !!’theme!!’)!! in Custom Fields -> Field Groups.

    Steps to Reproduce
    1. Install ACF, ACF Pro and ACF Extended Pro plugins with latest WPML plugins.
    2. Create folders in the theme for acfe_php and acf_json
    3. Create a test field group and add a field, and make sure you check the box to auto sync php and json int he advanced settings box to the right.
    4. After this, when you edit the field group, the label will look like this: !!__(!!’testtttdasdf!!’, !!’theme!!’)!!
    5. You can see if you look at the the acfe-php:
    ‘label’ => __(‘wpml test text field’, ‘theme’),
    (before installing ACF Extender Pro, that field looks like ‘label’ => ‘wpml test text field’)

    NOTE: this only happens with the extender pro add on plugin and when the multilingual setup is set to “same fields across languages”

    Debug
    The issue happens on?ACFE_AutoSync::save_file()?–?wp-content\plugins\acf-extended-pro\includes\modules\autosync.php?at the following snippet:

    acf_update_setting('l10n_var_export', true); 
    
    $field_group = acf_translate_field_group($field_group);
            
    // reset store to allow fields translation
    $store = acf_get_store('fields');
    $store->reset();
    
    $field_group['fields'] = acf_get_fields($field_group);
    
    acf_update_setting('l10n_var_export', false);

    It seems related to:

    acf_update_setting('l10n_var_export', true);  

    It seems expected as we have the following snippet on?acf_translate()?– wp-content\plugins\advanced-custom-fields-pro\includes\api\api-helpers.php:

    // allow for var_export export
    	if ( acf_get_setting( 'l10n_var_export' ) ) {
    
    		// bail early if already translated
    		if ( substr( $string, 0, 7 ) === '!!__(!!' ) {
    			return $string;
    		}
    
    		// return
    		return "!!__(!!'" . $string . "!!', !!'" . $textdomain . "!!')!!";
    }

    Workaround
    If we disable it, the issue does not happen.

    // acf_update_setting('l10n_var_export', true);  
    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the detailed report!

    This issue has been fixed last month with the 0.8.9.3 update, when the user created the ticket 5ZL37 he’s referring to in his comment on your forum.

    In fact, in the code you cited, right after:

    acf_update_setting('l10n_var_export', true);

    This line has been added to fix this specific issue:

    // reset store again to avoid storing translated fields
    // this fix an issue with acfml 2.0.2
    $store->reset();

    I can confirm that this update fix the issue, as the user reported to me back on the march, 23rd.

    I would recommend update your ACF Extended to the latest 0.8.9.3 version. You can use the free version of ACF Extended, and download it right here to try that fix. This part of the code is for both Free & Pro users anyway.

    Thanks!

    Have a nice day!

    Regards.

    Thread Starter diegootgs

    (@diegootgs)

    Thanks Konrad! I will update our team about the fix.

    About the testing email, we would like to also check if you are?interested in pushing forward any marketing activities with us. Could you please contact Dean via email or reply to the previous email so we can talk about this further?

    Regards,
    Diego

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility issue with WPML’ is closed to new replies.