Home›Supporto›Assistenza in italiano›[Risolto] Can't update the translation of a text field after it has been cleared of all its content
[Risolto] Can't update the translation of a text field after it has been cleared of all its content
Questo thread è stato risolto. Ecco una descrizione del problema e della soluzione.
Problem: You are using ACF PRO to create custom fields in a WooCommerce product and are trying to translate a text field from Italian to English using WPML. The translation updates correctly when there is text in the primary language field. However, if the primary language field is emptied, the translation in the secondary language does not update and continues to display the previous text. Solution: Due to the way ACF and WordPress function, it is not possible to update the translation when the primary language field is empty. This is not a bug but a technical limitation inherent to these platforms. A possible workaround is to manually edit the page.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.
Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.
La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.
Contesto del problema:
I have a WooCommerce product with many custom fields created using ACF PRO. I am trying to translate a specific text field from Italian to English using WPML. The translation works when there is text in the primary language field.
Sintomi:
But if I delete all the text inside this primary language field, making it empty, I can't update the field translation. The field in the secondary language still shows the previous text. If I enter any text, even a simple dot, the translation works fine.
Domande:
How can I update the translation of a text field when the primary language field is empty?
Quello che ha riferito l'IA è corretto, non è possibile modificare la traduzione di un campo se l'originale è vuoto. I workaround suggeriti sono le uniche soluzioni.
Buongiorno Laura, non sono sicuro di aver capito bene... la mia situazione è questa:
1. inserisco del testo nel campo in italiano
2. traduco normalmente il campo in inglese
3. elimino il contenuto in italiano
4. non posso aggiornare il contenuto del campo in inglese, quindi resta il contenuto precedente.
Senza offesa, ma il fatto che una traduzione non possa essere aggiornata solo perché il relativo campo nella lingua primaria è stato svuotato a me sembra un bug. Non sembra anche a te?
Ma io non voglio campi diversi nelle due lingue, anzi... voglio proprio gli stessi campi nelle due lingue. Quindi, dato che ho svuotato il campo in italiano vorrei poter svuotare anche il relativo campo in inglese... il problema è che WPML non mi permette di farlo 🙁
In che senso "cancellarlo"? Se intendi eliminare del tutto il campo ACF in questione non posso farlo perché lo stesso campo viene usato da diversi prodotti, e per alcuni prodotti il campo deve essere compilato.
Comunque, giusto per tagliare la testa al toro:
- secondo me il fatto che la traduzione di un campo non possa essere aggiornata se il campo nella lingua primaria viene svuotato, è un bug che andrebbe corretto.
- se secondo voi non è un bug e/o non avete intenzione di risolverlo, ditemelo chiaramente così mi metto a cercare direttamente una soluzione alternativa.
Per come funzionano ACF e WordPress, non è possibile risolverlo. Chiamala limitazione tecnica se preferisci, ma non è un bug in quanto è previsto che sia così.
Il possibile workaround te lo ha già dato l'IA, ed è editare manualmente la pagina.
Quindi è "previsto" che una traduzione non può essere aggiornata come tutte le altre? Ok, a me continua davvero a sembrare strano, ma se le cose stanno così direi che è inutile insistere.
Chiudo il ticket, anche se il problema non è stato risolto. Grazie comunque per il supporto 🙂