WPML
Stato
Risolto
Segnalato per
WPML Multilingual CMS 3.2.2
Risolto in
3.2.3

Panoramica del problema

Cercando di impostare “Questa è una traduzione di” di un articolo su “-Nessuno-”, l’impostazione non viene salvata. È possibile solo cambiarla con un altro articolo.

Soluzione alternativa

Segui questi passaggi:

  1. Individua la funzione “save_post_actions” nel file “inc/post-translation/wpml-admin-post-actions.class.php”.
  2. Trova il seguente blocco di codice:
    $trid = isset( $trid ) && $trid ? $trid : $this->get_save_post_trid ( $post_id, $post->post_status );
    // after getting the right trid set the source language from it by referring to the root translation
    // of this trid, in case no proper source language has been set yet
    $source_language = isset( $source_language ) ? $source_language : $this->get_save_post_source_lang ( $trid, $language_code, $default_language );
    
  3. Sostituiscilo con questo:
    if ( isset( $post_vars[ 'icl_translation_of' ] ) && $post_vars[ 'icl_translation_of' ] == 'none' ) {
    	$trid = null;
    	$source_language = $language_code;
    } else {
    	$trid = isset( $trid ) && $trid ? $trid : $this->get_save_post_trid ( $post_id, $post->post_status );
    	// after getting the right trid set the source language from it by referring to the root translation
    	// of this trid, in case no proper source language has been set yet
    	$source_language = isset( $source_language ) ? $source_language : $this->get_save_post_source_lang ( $trid, $language_code, $default_language );
    }
    

Il problema è stato risolto nella prossima nuova versione.

Tutti i problemi noti →