Close

Account

Documentation

Forum

Menu

WPML does not work

  • Post count: 1
    carnova
    July 29, 2014 at 1:53 pm #2279

    Hello,
    when i edit a page in default language the update is applied to the translated pages and the content is overwrite.
    Can someone help me? Thanks

    Post count: 2684
    Rai
    July 30, 2014 at 10:51 am #2322

    Hi @carnova,

    We don’t face those problem on our environment, perhaps you override post on default language instead of the translation?
    Also, if you use WPML I suggest you to ask to their support for further assistance.

    Thank you

    Post count: 1
    carnova
    July 30, 2014 at 3:02 pm #2331

    I fixed temporarily the issue by commenting the follow code in the wpml sitepress.class.php file.

    The function is _sync_custom_field

    Maybe this is an help to solve the issue.

    $removed = array_diff( $values_to, $values_from );

    foreach ( $removed as $v ) {
    $delete_prepared = $wpdb->prepare( “DELETE FROM {$wpdb->postmeta} WHERE post_id=%d AND meta_key=%s AND meta_value=%s”, $post_id_to, $meta_key, $v );
    $wpdb->query( $delete_prepared );
    }

    //added
    $added = array_diff( $values_from, $values_to );
    foreach ( $added as $v ) {
    $insert_prepared = $wpdb->prepare( “INSERT INTO {$wpdb->postmeta}(post_id, meta_key, meta_value) VALUES(%d, %s, %s)”, $post_id_to, $meta_key, $v );
    $wpdb->query( $insert_prepared );
    }

    Post count: 2684
    Rai
    July 30, 2014 at 4:45 pm #2335

    Hi @carnova,

    You’re awesome! Thank you for your solution.
    Hope that helps others with same problem 😉

    Regards

You must be logged in to reply to this topic.