Support

Account

Home Forums Bug Reports Relationship field – Wpml Reply To: Relationship field – Wpml

  • Hello Elliot,

    Here http://pastebin.com/3FxrprJr ,
    you can see the output of “var_dump(get_field(‘relation_sejour_chambre’) );”.

    I got all the data’s in French (Primary language) but none in the secondary languages (Nl and En)

    As you said, currently both French and En Url’s produce an empty array for both but only since yesterday when Andreas from WPML plugin has asked me to add :
    1. this function in my functions file : http://pastebin.com/V3v1UBvP
    2. Replace $posts = get_field(‘relation_sejour_chambre’);
    with $posts = lang_object_ids( get_field(‘relation_sejour_chambre’), ‘post’ );

    Since I did action number 2, I got this error :
    Catchable fatal error: Object of class WP_Post could not be converted to string in /homez.533/reloukin/vm/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 179

    And the result of this error is an empty echo array on the page in the main language french.

    If I let action number 2 as it was before, I got a nice arrow in french (main language) and “array(0) { } ” in the secondary languages…

    What do you think ?
    Thank you for your help !