Home › Forum › Vetrina Blog WP › qTranslate non funziona duplica contenuti
-
AutorePost
-
-
14 Gennaio 2012 alle 21:36 #20338San PietroburgoPartecipante
Proprio cosଠcoma da titolo; con WordPress 3.3 e 3.3.1 qTranslate non funziona perché duplica i contenuti scritti nell’editor nella lingua principale, in tutte le altre lingue.
Anche l’editor dei commenti non va, a plugin attivato spariscono i pulsanti per i tag html ed è impossibile usare il campo modifica data sulla destra.
Idem la paginazione degli archivi mensili, delle categorie, dei tags, e delle pagine di navigazione archivi dalla home; vedi nel tuo sito url come questa:
/?lang=en/page/2/
e questa:
/?lang=en%2Fpage%2F3%2F/page/2/
ed è impossibile navigare gli archivi in tutte le altre lingue, non funziona, va solamente nella lingua principale, e sai benissimo che cosଠperdi visitatori.
Se sei arrivato qui sai anche bene che sino ad ora l’autore del plugin che rende WordPress multilingua, qTranslate, non ha trovato una soluzione al problema; lo avrai letto in questa lunghissima discussione sul forum di supporto:
http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=2841
E di sicuro anche nel forum di wordpress.org in inglese:
http://wordpress.org/tags/qtranslate?forum_id=10
Hai un blog amatoriale, allora l’unica via è quella di aspettare, in attesa che Qian Qin risolve i problemi e rilasci una versione stabile di qTranslate; bene, prenditi una vacanza con le pubblicazioni e non pensarci su, si risolverà .
Ma se invece hai un sito in produzione con pubblicazioni giornaliere consistenti ed è un disastro ciò che sta accadendo, probabilmente hai deciso di metterci una pezza, subito e sei disposto a tutto; perfetto, sei arrivato nel posto giusto e una cosa la puoi fare: Affidarti a degli esperti che questi problemi li han già quasi del tutto risolti.
Sarebbe impossibile scrivere qui la soluzione al problema, troppi file da modificare e troppo codice da dover riscrivere… Ad esempio per la paginazione l’unica è di creare un tema child ed utilizzare codice di supporto al file functions.php del tuo tema, solo cosଠsi correggerà il problema.
Il sito che puoi vedere nel nostro username utilizza qTranslate, ed il plugin di cache w3tc, W3 Total Cache, e per noi non è difficile trovare le “soluzioni” per far funzionare al meglio i due plugin in questione.
Zhenya, personaggio attivo in questo forum di supporto di WordPress italiano, fa parte dei programmatori che lavora a quel Portale:
http://www.wpitaly.it/forum/profile.php?id=15739
Per tutto il resto che riguarda WordPress, BuddyPress ed i plugin Automattic trovi gli esperti WordPress Italia: http://goodpress.it/
-
24 Gennaio 2012 alle 11:41 #92424telizia85Partecipante
Salve sono nuova nel mondo di WordPress, sto realizzando un sito multilingua, ma erroneamente ho installato la versione 3.3.1 di wordpress per poter attivare un altro plugin, e ora non mi funziona più il plugin qtranslate. Riesco ad attivarlo e a visualizzare nell’editor le pagine nelle altre lingue, ma non funziona il riconoscimento automatico della lingua nel web, e non mi fa vedere il sito nelle altre lingue. Puoi essermi d’aiuto?
-
24 Gennaio 2012 alle 12:47 #92426AiRPartecipante
ma fino a che versione di wordpress qtranslate era stabile?
possibilità di tornare ad una vecchia versione di wordpress per far funzionare correttamente questo plugin?
come e dove trovare una vecchia versione di wordpress da poter installare?
-
24 Gennaio 2012 alle 15:04 #92441telizia85Partecipante
Ciao!Grazie per la pronta risposta!allora la versione di wordpress era la 3.3 , ora sembra che funzioni solo ho un’altro problema. Nel menu di navigazione utilizzo dei collegamenti a cui ho cambiato il nome dell’etichetta di navigazione, e questa non mi viene tradotta. Ho provato ad usare la formattazione [:it]Progetto[:en]Project, e anche la formattazione <!–:it–>Progetto<–:–><!–:en–>Project<–:–>, ma non mi funziona. Allego due immagini per spiegarmi meglio
Comunque non posso tornare alla vecchia versione perché non ho fatto un backup!
-
24 Gennaio 2012 alle 20:33 #92461San PietroburgoPartecipante
@ AiR
Il plugin qTranslate è stabile, solamente è necessario adattare il tema alle sue funzionalità . Non spieghi qual’è il tuo specifico problema ed altro quindi non so dirti.
@ telizia85
Con alcuni temi qTranslate è compatibile e con altri no, non sapendo quale tu stia utilizzando mi è impossibile conoscere la soluzione e poi ovviamente non l’ho testato con tutti i migliaia di temi in circolazione.
Rispondo quindi in via generale; se nel menù alcuni collegamenti funzionano correttamente ed invece quelli per cui tenti di personalizzare l’etichetta non vanno, la migliore soluzione sarebbe di creare un tema “child” ove verranno posizionati due file, un apposito js ed un functions.php, questi servono ad integrare quelli del tema in uso per renderlo compatibile a qTranslate.
La domanda è, sai già come creare il child del tuo tema?
-
25 Gennaio 2012 alle 13:14 #92488AiRPartecipante
ciao,
ti ho risposto qui descrivendo anche qual’è il problema che sto incontrando
se servono altre info tipo che ne so tema installato, versione di wordpress e versione del plugin qtranslate sono qui…
-
25 Gennaio 2012 alle 13:54 #92490San PietroburgoPartecipante
Ho letto la tua replica qui:
http://www.wpitaly.it/forum/topic.php?id=25479
Direi che possiamo proseguire in questo argomento che è più specifico al plugin qTranslate.
Dovrei conoscere alcune cose:
1. Qual’è il tema che sta utilizzando il sito;
2. se è un portale appena aperto oppure aveva già contenuti.
Se il sito è già online tutto dovrebbe essere più facile, serve però il suo indirizzo per poterlo visitare.
quindi ho la pagina corretta in italiano, quella in inglese che mi risulta la somma di tre lingue, quella francese vuota e resta vuota anche se la si va a correggere
E, possibilmente, anche un link a questa pagina col problema.
-
25 Gennaio 2012 alle 14:19 #92494telizia85Partecipante
@ telizia85
Con alcuni temi qTranslate è compatibile e con altri no, non sapendo quale tu stia utilizzando mi è impossibile conoscere la soluzione e poi ovviamente non l’ho testato con tutti i migliaia di temi in circolazione.
Rispondo quindi in via generale; se nel menù alcuni collegamenti funzionano correttamente ed invece quelli per cui tenti di personalizzare l’etichetta non vanno, la migliore soluzione sarebbe di creare un tema “child” ove verranno posizionati due file, un apposito js ed un functions.php, questi servono ad integrare quelli del tema in uso per renderlo compatibile a qTranslate.
La domanda è, sai già come creare il child del tuo tema?
Ciao, nel menu funzionano i collegamenti, l’unica parte in cui n funzionano sono per per i collegamenti a cui tento di personalizzare l’etichetta. Quando avevo installato la versione precedente non avevo questo problema, di fatti mi sembra strano.Comunque non so come creare il child del tema.Grazie per le risp
-
25 Gennaio 2012 alle 14:41 #92495San PietroburgoPartecipante
Un link alla pagina col problema. Inoltre devo sapere se il sito utilizza un plugin per il seo, e se sଠquale.
-
25 Gennaio 2012 alle 15:00 #92501telizia85Partecipante
http://www.tokovillage.com/nuovo/?lang=es ovviamente impostando la pagina in spagnolo.(ma anche le altre lingue mi danno lo stesso problema)
Non c’è nessun plugin per il seo, i plugin attivati sono:
Add From Server
Custom Content Type Manager
LinkLift (Widgets)
Member Access
Private Files for Social Privacy
Social Access Control
Social Access Control Privatize/Unprivatized Posts
WP-SWFObject
-
25 Gennaio 2012 alle 16:18 #92518San PietroburgoPartecipante
Ho visto il sito. Penso che l’unica strada percorribile sia quella di utilizzare un tema child che si interfacci a quello attuale; però non lo conosco, ho solo visto che è un tema premium, e non so se supporterà il “figlio”. L’unica sarebbe provare.
-
25 Gennaio 2012 alle 16:58 #92530telizia85Partecipante
Ma riesci a dirmi perchè prima che aggiornassi la versione di wordpress e di qtranslate funzionava?…comunque ora vedo perchè ho i tempi molto stretti e a questo punto evito di cambiare il nome dell’etichetta.
-
25 Gennaio 2012 alle 17:09 #92533SteveAglAmministratore del forum
La risposta sta nelal prima riga del primo post di questo thread.. baqsta leggere:
Proprio cosଠcoma da titolo; con WordPress 3.3 e 3.3.1 qTranslate non funziona perché duplica i contenuti scritti nell’editor nella lingua principale, in tutte le altre lingue.
-
25 Gennaio 2012 alle 22:52 #92547San PietroburgoPartecipante
Infatti.
Tecnicamente non è colpa del CMS ma del plugin. Con WordPress 3 sono state introdotte modifiche del page nav e della paginazione:
http://codex.wordpress.org/Function_Reference/paginate_links
Quindi man mano che i temi vengono aggiornati iniziano i problemi con qTranslate. Per alcuni temi è semplice creare un child e riprendere le vecchie funzioni da una versione precedente, per altri invece bisogna agire utilizzando gli appositi filtri che sono nel core di qTranslate, integrandoli al tema.
Poiché però queste son tutte modifiche temporanee, un buon tecnico utilizza il tema child, quindi senza mettere le mani nei file originali del tema. Sarà più semplice cosଠrimettere tutto in ordine (disabilitando il child oppure togliendo quei file dalla sua directory) nel momento in cui qTranslate sarà nuovamente stabile.
Diverso invece il discorso del menù di navigazione e delle etichette, perché lଠi problemi ci sono sempre stati. Ma sono facilmente risolvibili integrando il tema con un child che contiene due file (un js ed un functions.php). Questi faranno apparire un piccolo campo con le bandierine per poter navigare le varie lingue impostate, direttamente dalla pagina del menù, e da quel momento non servirà più utilizzare i quicktags tipo:
[:it]testo etichetta italiano[:en]testo etichetta inglese
oppure
<!–:it–>testo etichetta italiano<–:–><!–:en–>testo etichetta inglese<–:–>
Perché ci si sposterà da una lingua all’altra proprio come nel front-end.
-
26 Gennaio 2012 alle 11:16 #92548AiRPartecipante
Ho letto la tua replica qui:
http://www.wpitaly.it/forum/topic.php?id=25479
Direi che possiamo proseguire in questo argomento che è più specifico al plugin qTranslate.
Dovrei conoscere alcune cose:
1. Qual’è il tema che sta utilizzando il sito;
2. se è un portale appena aperto oppure aveva già contenuti.
Se il sito è già online tutto dovrebbe essere più facile, serve però il suo indirizzo per poterlo visitare.
quindi ho la pagina corretta in italiano, quella in inglese che mi risulta la somma di tre lingue, quella francese vuota e resta vuota anche se la si va a correggere
E, possibilmente, anche un link a questa pagina col problema.
ciao,
allora ti do un po’ di dettagli in più
1 -il tema è “Delicious Magazine 1.0.4 di WooThemes”
2 – avevo già messo degli articoli e delle pagine all’interno e tutto sembrava ok finchè non sono andato a fare gli ultimi aggiornamenti a wordpress e plugin ed ho scoperto esserci qualcosa che non va con qtranslate
qui un link ad un articolo che prima andava correttamente http://www.pdpossidazioneanodica.com/wp/2011/12/06/crp7/
ora invece, in questo articolo ho quando vado a modificarlo, la pagina in italiano direi ok ed invece sia quella in inglese che quella in francese che hanno al loro interno tutte e tre le lingue
non c’è modo di testare cosa vede chi naviga in inglese o francese?
leggevo dei “temi child” nei commenti precedenti
ci ho capito pochetto, ma al limite sarebbe possibile fare una cosa simile per far andare tutte le lingue correttamente?
un grazie per l’aiuto
-
26 Gennaio 2012 alle 11:21 #92549AiRPartecipante
ci fossero delle incompatibilità ho installato e attivi questi plugin più qualche altro attualmente inattivo:
Collapsing Categories
Google Doc Embedder
Google Docs Viewer
RV Embed PDF
e naturalmente qtranslate
il tutto su wordpress 3.3.1
-
26 Gennaio 2012 alle 11:49 #92551AiRPartecipante
altra domanda che mi viene è se almeno in italiano il mio sito funziona correttamente
se si intanto porto avanti il progetto in italiano e poi valuto il da farsi per le lingue compreso un triste aprire altri 2 siti uguali con 2 wordpress indipendenti in inglese e in francese
-
26 Gennaio 2012 alle 13:13 #92554San PietroburgoPartecipante
Non mi hai detto che versione di PHP gira sul server, diciamo che se è 5.2.4 o superiore sarà più semplice risolvere seguendo solo il secondo passaggio che vado ad esporre. Se invece il server utilizza PHP 5.3.x allora bisogna anche fare il primo passo.
Il problema che riscontri non è relativo al menù ed alle etichette (cioè la discussione con l’utente telizia85), ma solamente con l’editor.
Per sistemarlo è necessario fare questi due passaggi o solo il secondo (dipende dalla versione di PHP).
Primo passo (solo per PHP 5.3.x). Aprire questo url:
http://wordpress.org/extend/plugins/qtranslate/download/
Andare quasi in fondo alla pagina e, prima della scritta “Browse the Code”, scaricare il file .zip della versione “Development Version” (ci si clicca e parte il download). Scompattarla in locale e collegarsi al sito via FTP, sino al percorso:
/home/xxx/nomedominio.ltd/wp-content/plugins/qtranslate
Selezionare tutti i file contenuti nella directory del plugin e cancellarli; quando s’è conclusa l’eliminazione caricare il contenuto della Development Version.
Concluso il primo passaggio (od escluso se PHP è inferiore a 5.3.x) bisogna fare delle modifiche al codice del plugin oppure, in alternativa, caricare un ulteriore piccolo plugin creato da noi e che risolve il problema.
Per effettuare questo passo la via migliore sarebbe quella di poter accedere, attraverso un account “temporaneo” di amministrazione, al tuo sito.
E’ molto semplice:
Crei un utente di nome test dal pannello utenti lo passi ad amministratore, mi invii per email le credenziali e, dopo che avrò concluso con le modifiche, lo potrai cancellare, oppure meglio lo lasci dove sta (visto mai in futuro possa servire ancora), ma declassandolo ad utente sottoscrittore.
-
26 Gennaio 2012 alle 13:52 #92555AiRPartecipante
grazie per l’ennesimo utilissimo messaggio!
il sito è salvato su register con l’opzione wordpress attiva
ho spulciato un po’ register ma non ho trovato la versione php
se mi dite dove trovarla poi ve lo comunico
capito questo mi tiro su le maniche e faccio come hai descritto
altre domande…
possibilità di perdere quello già tradotto facendo questa manovra?
com’è ora nel solo italiano il sito dovrebbe funzionare correttamente?
-
26 Gennaio 2012 alle 14:04 #92556San PietroburgoPartecipante
Prima di mettere mano al sito fai il backup. Inoltre installi il plugin WP-DB-Backup prelevandolo da qui:
http://wordpress.org/extend/plugins/wp-db-backup/
Ed idem fai il backup del database, con l’opzione che te lo spedisce in email.
La versione Development di qTranslate risolve molti errori col PHP, ovviamente gira meglio anche con PHP 5.2.4 o superiore. Se decidi di installarla ovviamente il processo descritto nel post precedente va fatto a plugin inattivo (dal pannello di amministrazione lo disattivi e poi operi da FTP).
Il sito l’ho ispezionato ed ho notato alcune pagine con il contenuto italiano che s’è duplicato nelle altre lingue, ad esempio qui:
/wp/en/chi-siamo/ cioè la pagina Chi siamo.
-
1 Febbraio 2012 alle 17:49 #92783AiRPartecipante
fatto il backup con WP-DB-Backup come faccio ad importare il mio file scaricato via email sull’attuale o su un altro blog?
sto facendo dei test su un blog salvato su altervista onde evitare sorprese
-
1 Febbraio 2012 alle 17:57 #92786San PietroburgoPartecipante
A questo link del Wiki la voce numero 7 e poi nella parte finale della pagina:
-
2 Febbraio 2012 alle 15:10 #92820AiRPartecipante
ok
studiamo il link che mi hai passato e proviamo…
-
2 Febbraio 2012 alle 15:51 #92822AiRPartecipante
trovo questo link http://www.wpitaly.it/wiki/Main/BackupDB un attimo ostico
fare esporta e importa da un sito ad un altro non da lo stesso risultato?
non mi serve un backup perfetto, ma semplicemente una serie di articoli su cui testare le lingue e qtranslate
-
2 Febbraio 2012 alle 16:00 #92823AiRPartecipante
San Pietroburgo saresti disposto a farmi questo passaggio “Crei un utente di nome test dal pannello utenti lo passi ad amministratore, mi invii per email le credenziali e, dopo che avrò concluso con le modifiche, lo potrai cancellare, oppure meglio lo lasci dove sta (visto mai in futuro possa servire ancora), ma declassandolo ad utente sottoscrittore.” ?
-
2 Febbraio 2012 alle 16:00 #92824AiRPartecipante
nota anche che ancora non so che versione di php sia installata su register.it
-
2 Febbraio 2012 alle 17:19 #92828San PietroburgoPartecipante
Fai cosà¬, installa questo plugin:
http://wordpress.org/extend/plugins/wp-system-health/
Non preoccuparti della compatibilità che appare anziana, io lo uso e funziona ed è supportato dal suo sviluppatore (tedesco).
Con quel plugin potrai leggere molti parametri del server tra cui anche la versione di PHP che gira.
Poi posta qui il risultato.
-
7 Febbraio 2012 alle 9:27 #92959AiRPartecipante
segnalo che è uscito un aggiornamento di qtranslate
ora siamo alla 2.5.28
qualcuno ha testato questa versione e sa dirmi se funziona correttamente???
io attendo suggerimenti prima di aggiornarlo e rischiare di perdere o peggiorare con qualche bug i testi che ho già trascritto in inglese e francese
x San Pietroburgo
ho installato il plugin che mi hai consigliato
dal menù “php” mi risulta questa versione “PHP Version 5.2.6-1+lenny9”
se servono altre info sono qui!
-
7 Febbraio 2012 alle 12:35 #92970San PietroburgoPartecipante
Per funzionare egregiamente qTranslate ha “sempre” bisogno di alcune modifiche in un file del core.. Pare quasi che il suo sviluppatore non desideri correggere certe cosucce ed è abbastanza comprensibile il perché; stessa cosa capita anche con altri plugin diffusi, ad esempio w3tc. Noi interpretiamo la cosa in questo modo: Chi scrive plugin per WordPress non ha mai un ritorno del tempo che impiega per lo sviluppo e quindi, per non lavorare gratis e per la gloria, fa sଠche il plugin abbia bisogno di alcune piccole correzioni. In quel modo riuscirà a guadagnarci qualcosa.. Poiché l’utente medio, preso dallo sconforto, lo contatta e si fa mettere a punto il sito (offrendo un obolo per il lavoro).
Comunque sia aggiornando non potrai perdere nulla, il plugin non interagisce col database ma solamente utilizza filtri, js, personalizzazioni dell’editor, ecc., per fare il suo lavoro.
-
7 Febbraio 2012 alle 14:19 #92990AiRPartecipante
quindi che dici provo ad aggiornare qtranslate alla nuova versione e vediamo un po’ cosa succede?
ho fatta un backup degli articoli ed ho inserito il tutto in questo mio sito che sto usando come test http://caffecaffe.altervista.org/
ad una prima occhiata con l’ultimo aggiornamento fatto a qtranslate sembrerebbe essere tutto ok
-
8 Febbraio 2012 alle 9:54 #93025AiRPartecipante
ho aggiornato il plugin alla versione 2.5.58 compatibile con wordpress 3.3.1 e direi che è tutto ok!!!
mi manca da tradurre le “pagine” mentre per gli articoli direi che tutto sembrerebbe funzionare!!! ^____^
per l’italiano sfogliando a campione in sito mi sembrerebbe andar tutto!
come faccio a testarlo in francese e inglese?
qui il link al sito per chi volesse darmi una mano a testare le lingue http://www.pdpboxdoccia.it/
-
8 Febbraio 2012 alle 18:50 #93046San PietroburgoPartecipante
ho aggiornato il plugin alla versione 2.5.58 compatibile con wordpress 3.3.1 e direi che è tutto ok!!!
Prima di mettere le mani in post o pagine già pubblicate e che vorresti modificare fai il backup del database; qTranslate lo conosco come le mie tasche e faccio supporto a molti Siti russi che lo utilizzano. Abbiamo già scoperto che ha un nuovo bug con l’editor: Ad alcuni capita di aprire un post pubblicato per fare modifiche e quando pubblicano perdono tutto il contenuto di una delle altre lingue di quell’articolo. Pertanto backup, backup e ancora backup.
Ci sto lavorando e non potrò andare a dormire sin quando non avrò partorito un fix per almeno rimette in sesto questa cosa e farlo funzionare.. Ma ho già idea di come fare.
come faccio a testarlo in francese e inglese?
Innanzi tutto dovresti inserire il suo widget, oppure un box dove più ti piace, per passare da una lingua all’altra.
-
8 Febbraio 2012 alle 21:27 #93058San PietroburgoPartecipante
Ed ecco un crazy js per tamponare il problema, buono sino a che sarà rilasciata una versione stabile:
@edit
A che serve:
1. Risolve il problema della perdita di contenuto nelle altre lingue quando si va ad aprire ed aggiornare un post già pubblicato.
2. Risolve la perdita della formattazione (spariscono i tag <p>) nelle altre lingue per i nuovi post.
-
10 Febbraio 2012 alle 0:13 #93107AiRPartecipante
ciao,
avevo fatto il backup come mi avevi consigliato qualche commento più in su
ad occhio sembrerebbe essere sempre tutto ok!
spero…
per questo invece cosa devo fare http://pastebin.com/WQHsiWp6 ?
mi sembra una cosa fuori dalla mia portata!!!
heeelllp!!!!
-
10 Febbraio 2012 alle 11:24 #93118San PietroburgoPartecipante
Sarà fuori della portata per chi con il codice non è pratico.. Comunque nella parte alta del file è indicato dove intervenire. Un altro modo (testato e funziona) più semplice è quello di aprire il file qtranslate_wphacks.php e cercare questa parte del codice:
// remove wpautop
if('html' != wp_default_editor()) {
remove_filter('the_editor_content', 'wp_richedit_pre');
Trasformandola cosà¬:
// remove wpautop
if('html' != wp_default_editor()) {
remove_filter('the_editor_content', 'wp_richedit_pre');
// added by Zhenya - bugfix <>&
add_filter('the_editor_content', 'wp_htmledit_pre');
}
Anche in questo modo si risolve il problemino della versione 2.5.58 di qTranslate.
-
15 Febbraio 2012 alle 13:32 #93291AiRPartecipante
rieccomi!
domani mi metto davanti al pc con calma e provo a fare la modifica al file qtranslate_wphacks.php
altra domanda…
come faccio ad inserire le bandierine italia, inghilterra e francia nel sito in modo che gli utenti possano eventualmente cambiare lungua?
-
15 Febbraio 2012 alle 15:15 #93301San PietroburgoPartecipante
Per le bandierine ci sono diverse possibilità : Possiamo posizionarle dove si desidera, aggiungendo del codice al tema utilizzato, oppure (più semplice) inserendo un widget in una delle sidebar.. Si può tra l’altro scegliere se devono apparire solamente bandierine, solo testo, od entrambi.
La discussione su questo argomento era già stata affrontata ed avevamo scritto il codice; sfogliando questa lista, in tema qTranslate, dovresti trovare con facilità :
-
15 Febbraio 2012 alle 19:44 #93308pinkpepperPartecipante
Salve.
HO installato, da tempo in verità , la versione 2.5.24 di qtranslate su un wordpress 3.2.1
sul sito di un cliente.
Oggi ho aggiornato qualche plugin (tra cui Next Gen, Lightbox, FSCS e Events Manager”).
Ora succede che se ad esempio creo un nuovo evento (cui posso dare il titolo in entrambe le lingue, sia IT che EN)
il titolo dello stesso nella pagina Eventi lo mostra cosà¬:
Es.
<!–:it–>questo è il mio titolo<!–:–><!–:en–>This is my title<!–:–>
Lo stesso tipo di visualizzazione me la da, ad esempio, se in NextGen gallery scelgo Manage gallery, nome gallery e scrollo la tendina accanto a Crea new page. Vedrò, ad esempio,tra le pagine, i doppi titoli, cosà¬:
<!–:it–>Eventi<!–:–><!–:en–>Events<!–:–>
C’è un modo per dire a wordpress di NON visualizzarmi questi quicktags, che tra l’altro fino ad oggi non avevo mai visto?
Grazie mille a tutti.
i.
-
15 Febbraio 2012 alle 21:39 #93315San PietroburgoPartecipante
Quei tag appaiono se qTranslate viene disattivato, oppure se il plugin si è auto-disattivato aggiornando WordPress; in questo ultimo caso nella pagina dell’editor (ad esempio per creare un post o modificarne uno già pubblicato) dovresti vedere un riquadro in alto di avviso.
Se nulla di tutto questo allora la causa va ricercata nel server, i due casi più probabili sono:
1. Gettext non funge, provare riavviando il server;
2. qualcosa non è a posto con i permessi di file e cartelle.
Ci sono anche possibili altri motivi, ma non posso scrivere l’enciclopedia per tutte le probabili configurazioni dei millemila server di questa terra..
-
16 Febbraio 2012 alle 8:52 #93332pinkpepperPartecipante
Ciao, e grazie della risposta.
Qtranslate non è stato disattivato (ho provato a disattivarlo dopo essermi accorta dei quicktags), nè ho aggiornato la versione di wordpress.
Il sito è hostato su Aruba, non posso riavviare Gettext.
Circa i permessi,m ti riferisci a quelli della cartella plugins/qtranslate?
E come dovrebbero essere?
In ogni caso grazie.
-
16 Febbraio 2012 alle 13:22 #93352San PietroburgoPartecipante
Su aruba i permessi li ripristini automaticamente dal pannello di controllo; una soluzione definitiva per i chmod la puoi leggere qui:::
http://www.wpitaly.it/forum/topic.php?id=11311
qTranslate distribuzione ufficiale lavora bene con PHP 5.2.4 e superiori, ma se nel tuo server gira una versione superiore alla 5.3.x gli vanno fatte diverse modifiche.
-
20 Febbraio 2012 alle 16:17 #93537AiRPartecipante
per le bandierine ho risolto inserendo il semplice codice html che copio qui sotto, perchè il widget di qtranslate andava bene con il testo, ma se metto testo e immagini me le sovrappone, mentre con le sole immagini me le mette tutte incolonnate e attaccate senza darmi possibilità di scegliere come impaginarle
<table style=”text-align: left; width: 100px;” border=”0″
cellpadding=”2″ cellspacing=”2″>
<tbody>
<tr>
<td style=”text-align: center;”><a
href=”http://www.pdpossidazioneanodica.com/wp/”><img
title=”PDP Box Doccia Italiano”
style=”border: 0px solid ; width: 30px; height: 20px;”
alt=”PDP Box Doccia Italiano”
src=”http://www.pdpossidazioneanodica.com/wp/wp-content/uploads/2012/02/italia1.gif”></td>
<td style=”width: 100%; text-align: center;”><a
href=”http://www.pdpossidazioneanodica.com/wp/en/”><img
style=”border: 0px solid ; width: 30px; height: 20px;”
alt=”PDP Box Doccia English” title=”PDP Box Doccia English”
<td style=”text-align: center;”><a
href=”http://www.pdpossidazioneanodica.com/wp/fr/”><img
style=”border: 0px solid ; width: 30px; height: 20px;”
alt=”PDP Box Doccia Français” title=”PDP Box Doccia Français”
src=”http://www.pdpossidazioneanodica.com/wp/wp-content/uploads/2012/02/francia1.gif”></td>
</tr>
</tbody>
</table>
-
20 Febbraio 2012 alle 16:32 #93540San PietroburgoPartecipante
Non la vedo una soluzione ottimale; per inserire solo le bandierine è sufficiente questo nel template:
<?php echo qtrans_generateLanguageSelectCode('image'); ?>
Per poi lavorare sul css per posizionarle come desidero.
Se invece utilizzo il widget e desidero disporle orizzontalmente, posso aggiungere al file style.css del tema qualcosa simile a questa linea css:
.qtrans_language_chooser li { float:left; margin-right:3px }
@edit
Oltretutto il tuo sistema non funzionerà per “passare” da una lingua all’altra di una pagina o post, ma porterà il lettore alla rispettiva home page della bandierina selezionata.
-
27 Febbraio 2012 alle 14:27 #93870AiRPartecipante
capisco!
ora vedo di correggere…
non avevo immaginato si potesse saltare da una lingua alla’altra col mio meteodo
-
29 Marzo 2012 alle 10:06 #94668sabiroPartecipante
Salve,
io ho in uso la versione 2.5.28 di qTranslate installata su WP 3.3 tradotta in italiano.
In quella il file “qtranslate_wphacks.php” è diverso e non ritrovo i riferimenti al codice. Cosa mi conviene fare aggiornare alla versione 2.5.58 e tentare la modifica proposta?
Tra l’altro nella sezione plugin di WP non mi propone nemmeno l’aggiornamento di qTranslate come se non ci fosse.
Per ora mi sono accorto solo che saltano i paragrafi e a volte i contenuti.
Grazie per le info!
-
11 Aprile 2012 alle 7:40 #94899mark1210Partecipante
Avendo aggiornato il WP ti sei catapultato nel grande dilemma di qTranslate, Benvenuto tra noi!
Purtroppo si ti conviene aggiornare e pacciare il file qTranslate ci sono varie soluzioni ma nessuna regola tutto dipende da vari fattori, tipologia di server php, thema che usi e altri fattori ci metterei anche fortuna… Fai sempre un buckup disattiva qTranslate prima dell aggiornamento e pacchialo ( con questa ultima soluzione:
vai su /wp-content/plugins/qtranslate/qtranslate_javascript.php, find this code:
Code: Select all
$q_config = “
qtrans_hook_on_tinyMCE = function(id) {
tinyMCEPreInit.mceInit[id].setup = function(ed) {
ed.onSaveContent.add(function(ed, o) {
qtrans_save(switchEditors.pre_wpautop(o.content));
});
};
ed = new tinymce.Editor(id, tinyMCEPreInit.mceInit[id]);
ed.render();
}
“;
SOSTITUISCI CON
Code: Select all
$q_config = “
qtrans_hook_on_tinyMCE = function(id) {
tinyMCEPreInit.mceInit[id].setup = function(ed) {
ed.onSaveContent.add(function(ed, o) {
if (!ed.isHidden()) {
qtrans_save(switchEditors.pre_wpautop(o.content));
}
});
};
ed = new tinymce.Editor(id, tinyMCEPreInit.mceInit[id]);
ed.render();
}
“;
This should fix the content duplication bug (changing language tab when in html mode replaces content on post save).
For the new line bug (new line is sometimes added on top of content), please try the following fix:
In /wp-content/plugins/qtranslate/qtranslate_javascript.php, find this code:
Code: Select all
$q_config = “
var waitForTinyMCE = window.setInterval(function() {
if(typeof(tinyMCE) !== ‘undefined’ && typeof(tinyMCE.get2) == ‘function’ && tinyMCE.get2(‘content’)!=undefined) {
tinyMCE.get2(‘content’).remove();
window.clearInterval(waitForTinyMCE);
}
}, 250);
“;
Replace with:
Code: Select all
$q_config = “
var waitForTinyMCE = window.setInterval(function() {
if(typeof(tinyMCE) !== ‘undefined’ && typeof(tinyMCE.get2) == ‘function’ && tinyMCE.get2(‘content’)!=undefined) {
content=jQuery(‘#content’).val();
tinyMCE.get2(‘content’).remove();
jQuery(‘#content’).val(content);
window.clearInterval(waitForTinyMCE);
}
}, 250);
“;
Aneon
Posts: 5
Joined: Tue Mar 13, 2012 3:34 am
(soluzione proveniente dal sito ufficiale forum qtranslate http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=2841&start=180)
per poi riattivarlo una volta attivo crea una pagina di prova e fai tutte le prove possibile se duplica ancora i contenuti nella seconda lingua se ci sono e se da problemi con le spaziature… fai almento4 salvataggi della pagina di prova se tutto va bene allora puoi procedere ad aprire le pagine del sito e aggiornale… buona fortuna
-
13 Aprile 2012 alle 11:28 #94949San PietroburgoPartecipante
E’ molto più semplice e pulito aprire il file qtranslate_wphacks.php per cercare (e modificarlo) questo pezzetto di codice (come avevo già descritto qualche post più indietro più di un paio di mesi fa’).
// remove wpautop
if('html' != wp_default_editor()) {
remove_filter('the_editor_content', 'wp_richedit_pre');
// added by Zhenya - bugfix <>&
add_filter('the_editor_content', 'wp_htmledit_pre');
}Alle volte però la modifica non funziona e la colpa è del tema utilizzato; in questo caso l’unica è aggiungere del codice al file functions.php del tema, personalizzato a dovere.
-
13 Aprile 2012 alle 11:35 #94950sabiroPartecipante
Il tema in uso è Gluttony.
Devo dire che credo di essere stato fortunato.
L’unico problema che per ora avevo riscontrato era che saltavano i paragrafi.
Ad una più attenta analisi mi sono accorto che saltano solo i paragrafi delle pagine quando le si vuole modificare, cosa che invece non succede agli articoli.
Avete quale idea del perché e se è possibile sistemare anche le pagine?
Immagino che la soluzione possa risiedere nel tema che dite?
Grazie!
-
13 Aprile 2012 alle 11:46 #94951San PietroburgoPartecipante
Il problema è di WordPress e non di qTraslate.. E adesso mi linciano se non spiego la situazione.
Spiego in parole semplici (non è un trattato tecnico):
Sino a qualche tempo fa’ tutto andava bene, poi è arrivato il secondo tema di WP, quello di nome Twenty Eleven; questo tema è HTML5, ma l’editor TinyMCE non è un editor per documenti HTML5.. Cambiarlo? Certo che no!
E cosଠquelli di WordPress hanno dovuto, per necessità , fare alcune modifiche per mettere a posto tutto e renderlo funzionante e compatibile con entrambi i formati.
Queste modifiche sono quelle che hanno generato il problema a qTranslate (e non solo) e l’unica è filtrarle prima che entrino in azione.
Ecco perché con alcuni temi il filtro funziona e con altri invece non va.
-
13 Aprile 2012 alle 11:58 #94952sabiroPartecipante
Sଠma allora perchè all’interno dello stesso tema, come nel mio caso, pagine e articoli si comportano diversamente?
In sostanza l’editor di WordPress quando apre il contenuto di una pagina rimuove i paragrafi, mentre quando apre il contenuto di un articolo non lo fa… Boh!
-
13 Aprile 2012 alle 12:11 #94953San PietroburgoPartecipante
Beh, innanzi tutto si dovrebbe prelevare un backup del database e guardare esattamente cosa succede con le pagine, visto che son quelle ad avere il problema.
Il contenuto della pagina viene salvato in modo corretto od errato? Da qui si comprende cosa scrivere nel codice per correggere il problema col tema..
Senza questa informazione è impossibile capire se la pagina viene “disintegrata” quando si salva nel database, oppure solamente nel momento in cui viene “fornita” al client. Il più delle volte (per mia statistica) è il secondo caso, poiché WordPress “interagisce” con l’editor e con la stampa del contenuto; ma filtrando la sua interazione si risolve il problema.
Anche nel primo caso si crea qualcosa di simile, scrivendo un apposito filtro per far si che il contenuto sia correttamente scritto nel db.
-
13 Aprile 2012 alle 12:22 #94954sabiroPartecipante
La pagina viene scritta correttamente nel db.
Se ad esempio devo modificare una parola in una pagina e vado ad aprirla nell’editor subito scompaiono i paragrafi.
Ma se modifico la parola in questione e rimetto da capo tutti i paragrafi come erano prima WP la salva correttamente.
Le pagine vengono “disintegrate” in fase di apertura dell’editor.
-
14 Aprile 2012 alle 22:10 #94985San PietroburgoPartecipante
Beh. Si tratta quindi di scrivere un filtro, da posizionare nel file functions.php del tema, per fare si che quando l’editor preleva dal database la pagina non sconquassi tutto.
Scriverlo qui nel forum è praticamente impossibile; e poi comunque ci vuole il tema per le mani (in una installazione in locale) per studiarsi un attimo la cosa e renderla funzionante.
-
16 Aprile 2012 alle 10:37 #95030sabiroPartecipante
Purtroppo vengo da ASP e quindi di PHP non ne so molto, ma immagino che se riuscissi ad identificare la funzione che definisce il comportamento dell’editor quando apre (correttamente) il contenuto di un articolo, potrei prenderne spunto per sistemare la funzione che apre il contenuto delle pagine sballandole.
Qualcuno sa indicarmi dove devo indirizzare le mie ricerche?
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.