Home › Forum › Problemi Vari con WP › Problema accesso wp dovuto errore stringa php
-
AutorePost
-
-
24 Ottobre 2015 alle 14:17 #30239Lorenz91Partecipante
Salve a tutti,
Ho un problema che non riesco a risolvere, data anche la mia poca esperienza con wp
Da ieri il sito a cui stavo lavorando non è più fruibile in quanto segnala il problema di errore nella struttura del php quando non torna qualcosa.
Nello specifico questo è il termine che mi viene contestato: Parse error: syntax error, unexpected ‘)’ in /home/lavillet/public_html/wp-content/themes/auberge/inc/setup.php on line 1993
Il tema che sto utilizzando è gratuito e si chiama: Auberge, il sito è hostato su Siteground, mentre il sistema operativo da cui lavoro è Microsoft.
Il tutto è nato dal momento in cui volevo modificare il footer andando a tagliare, per poi rincollare all’interno del php la stringa che volevo personalizzare. (la classica prova da principianti del provo a tagliare una stringa, aggiorno vediamo che succede male male la rimetto dove era prima)
In un primo momento sono andato a cercare il file php del footer sul web dello stesso tema per vedere se avessi sbagliato qualcosa nel tagliare e incollare, ma i due testi comparati sono esattamente identici.
Aggiornando il file è comparso questo errore che fino ad ieri mi faceva comunque navigare all’interno della mia dashboard.
Da oggi non ho proprio la possibilità di fare il login normalmente in quanto l’errore si presenta istantaneo non facendomi proseguire con l’accesso etc..
Da una parte non capisco cosa posso avere sbagliato in quanto ho fatto veramente un taglia e subito dopo reincolla (stessa posizione, stessi spazi) dall’altra sono amareggiato.
Sicuramente la poca esperienza non gioca a favore, ma sono qui apposta per imparare da tutti voi.
Grazie in anticipo per chi risponderà
Premetto: anche di php/html ne mastico il giusto e l’onesto.
-
24 Ottobre 2015 alle 17:27 #119109Lorenz91Partecipante
Risolto, come non detto!
Scusate il disturbo.
-
24 Ottobre 2015 alle 17:33 #119110TittiModeratore
Parse error: syntax error, unexpected è sempre un errore di scrittura, basta una parentesi o un apice in più o mancante.
Le modifiche non si fanno in quel modo. Si apre una connessione FTP, si scarica in copia locale il file che si vuole modificare e solo dopo si modifica il file sul server. *
Se qualcosa non va, si ricarica immediatamente il file copiato al suo posto. Pulito, veloce e sicuro.
Il “taglia-incolla” è un’arma letale per tutti, ma soprattutto in mano ai non esperti.
Altro errore: pare che tu stia modificando il tema originale. Devi fare un child per le modifiche, altrimenti al prossimo aggiornamento le perdi.
Edit: * o si fanno due copie e si lavora su una di queste in locale.
-
24 Ottobre 2015 alle 17:44 #119111Lorenz91Partecipante
Grazie Titti,
I tuoi suggerimenti sono molto utili, in questo caso ho dovuto reinstallare il tema, prima cancellandolo dal ftp. e poi nuovamente installandolo.
Fortunatamente a parte i widget (che erano poco) è rimasto tutto intatto,
Hai ragione nel dire che in questo modo non si fa, ripeto sono ancora un novellino del mondo wp però ti garantisco che avevo tagliato una stringa, aggiornato il file, visto che non funzionava quindi re-incollato la stessa stringa nello stesso posto, ma ormai l’errore era stato generato.
Per il discorso child hai ragione anche qui, solo che mi sto prima documentando bene sull’argomento poi sicuramente lo farò! Immagino se fosse stato un tema comprato il discorso sarebbe stato diverso…
-
24 Ottobre 2015 alle 18:11 #119112TittiModeratore
1) No, l’errore PHP sparisce appena è corretto. Hai sbagliato a tagliare e incollare, e basta. àˆ sufficiente anche solo l’uso di un editor non appropriato.
2) La creazione di un child-theme è il modo migliore per cominciare a documentarsi sull’argomento. Non cambia se il tema è gratuito o a pagamento – le modifiche le perdi comunque ad ogni aggiornamento se non usi un child. L’unica differenza è, eventualmente, nel supporto dell’autore.
-
24 Ottobre 2015 alle 18:34 #119113Lorenz91Partecipante
Grazie nuovamente!
Ho ancora tanto da imparare.
Lorenzo
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.