Home › Forum › Problemi Vari con WP › WP mi modifica il codice! :-(
-
AutorePost
-
-
21 Novembre 2007 alle 23:28 #5125AntinooPartecipante
Ciao a tutti.
Avete presente l’editor di WP, in cui ci sono le due opzioni “Visuale” e “Codice”?
Be’, io in genere inserisco direttamente il codice xhtml, ma quando clicko su “Visuale” o quando salvo/pubblico il post, WP mi modifica il codice: ad es. sostituisce i tag “div” con tag “p”, ma in generale mi scombina il codice al punto che diventa tutto abbastanza illegibile…
C’è modo di disabilitare questa cosa di WP?
Cioè vorrei che il codice che inserisco non venga minimamente toccato da WP: si può fare?
In “Opzioni” -> “Scrittura”, le (due) opzioni per la formattazione sono disabilitate.
Cos’altro devo fare?
Ciao!
-
22 Novembre 2007 alle 9:24 #48091SteveAglAmministratore del forum
Se posti usando una login con ruolo di amministratore ed usi solo l’editor classico e non il visuale viene accettato praticamente qualsiasi codice.
Trovi una opzione per disabilitare l’editor visuale per il tuo account sotto Utenti->Il mio profilo resta da vedere perchè uno debba inserire dei div o altro all’interno di un post quando questi elementi dovrebbero essere gestiti a livello di Tema.
-
22 Novembre 2007 alle 11:19 #48093AntinooPartecipante
Quindi non si può tenere anche l’editor visuale? Bisogna per forza disabilitarlo del tutto, giusto?
Va be’, vorrà dire che guarderò ogni volta l’anteprima, oppure vedrò di togliere nel codice di WP la chiamata alla “correzione” del codice, ammesso che esista…
Quanto ai div, li uso per dei piccoli artifici coi CSS.
La trasformazione div –> p era solo la cosa più evidente, ma in realtà l’editor me ne combinava di peggio, come ad esempio cancellarmi arbitrariamente alcuni tag di chiusura, come alcuni </p>…
Grazie, comunque!
-
22 Novembre 2007 alle 11:38 #48094AntinooPartecipante
Accidenti… senza l’editor visuale, nella pagina di scrittura dei post non c’è neppure più il form per caricare immagini sul server!
E’ normale poi che in “Gestione” -> “Carica” ci siano le immagini che avevo caricato fino ad oggi (tramite l’editor visuale), ma non ci sia la possibilità di caricare sul server nuovi file?
Devo per forza fare l’upload nelle varie cartelle e creare i relativi link manualmente?
Ora provo a guardare nel codice di WP se è possibile avere un editor visuale che non modifichi affatto il codice…
-
22 Novembre 2007 alle 12:27 #48095SteveAglAmministratore del forum
Come no… direi che hai qualche cosa che non va allora, forse qualche plugin, il modulo di caricamento file è sempre presente.
-
22 Novembre 2007 alle 19:18 #48112AntinooPartecipante
Ho riavviato il server e svuotato la cache del browser e ora me lo mostra.
Però il problema rimane: il codice che inserisco io non è ancora il codice che poi viene pubblicato.
Viene già modificato molto meno rispetto a prima, però ad esempio in certi casi mi raddoppia il tag di chiusura </p>, mi elimina o inserisce dei
(metto le parentesi quadre altrimenti non va), e cosଠvia.C’è da dire che nel database il codice del post è quello che inserisco io, quindi è in fase di visualizzazione che viene modificato. Eppure gli unici plugin che ho installati sono quelli di default.
Qualche idea?
-
22 Novembre 2007 alle 19:26 #48113wollyAmministratore del forum
di default non ci sono plugi attivati
prova a disattivare tutti i plugin e metti il tema standard e vedi se funziona
-
22 Novembre 2007 alle 21:30 #48117AntinooPartecipante
I plugin attivati di default (ho scaricato il pacchetto italiano di WP presente sul sito) erano “Akismet” e “Hello Dolly”, che ho disabilitato.
Il tema era l’unica cosa che avevo aggiunto.
Ora l’ho riportato a quello di default, ma il codice viene ancora modificato.
Giusto per sapere: è un problema che capita solo a me, oppure capita anche ad altri, se non a tutti?
Voi il codice xhtml che inserite poi ve lo ritrovate pari pari (a meno di modifiche di plugin) ?
-
22 Novembre 2007 alle 21:35 #48118AntinooPartecipante
Ok, probabilmente ho risolto.
Ho avuto la giusta impressione che fosse l’engine stesso di WP a modificare il codice, e cercando con google ho trovato questo thread in cui “assie-chan” ha il mio stesso problema ed esprime quello che secondo me è un buon consiglio: rendere disponibile un’opzione per far sଠche l’engine di WP non tocchi in alcun modo il codice.
Ora provo il plugin indicato e vi faccio sapere…
-
22 Novembre 2007 alle 21:39 #48120AntinooPartecipante
Perfetto! Finalmente il codice non viene toccato minimamente!
D’ora in poi terrò sempre attivo tale plugin!
Grazie a entrambi
-
17 Marzo 2008 alle 0:28 #51598MDTPartecipante
Qualcuno sa la differenza tra i vari formati di codifica?
You can choose between Markdown, Textile 1, Textile 2, nl2br, WPautop, and “No Formatting” for formatting along with the choice of SmartyPants, WPTexturize or “No Encoding” for character encodings.
Se devo scrivere codice php o javascript dentro in wordpress quale codifica mi conviene usare?
Grazie, ciao.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.