Home › Forum › Plugin e temi di WP › Notifica d'errore dopo aggiornamento sito a WP. 4.3.0
-
AutorePost
-
-
5 Settembre 2015 alle 7:26 #30031RobstevenPartecipante
Buon giorno!
Ho aggiornato il mio sito alla versione 4.3.0 di WordPress. Tutto bene se non che nella testata compare una notifica di deprecazione riguardante i widget alla riga 3457 del file functions.php.
In vari forum risolvono il problema disattivando il debug nel file config.php (da ‘true’ a ‘false’). La soluzione, però, non fa per me, in quanto io non ho mai attivato il debug nel mio file config.
Qualcuno ha proposto di inserire nel file functions.php la seguente stringa:
add_filter(‘deprecated_constructor_trigger_error’, ‘__return_false’);
ma, una volta ricaricato il sito, mi esce un errore in quanto ci si richiama ad una funzione inesistente.
So che il bug, perché di questo in realtà si tratta, verrà corretto nella versione 4.3.1 e che il team wp. sta avvertendo tutti gli editer di plugin della modifica da apportare per evitare questo tipo di sintassi deprecata dal PHP.
Il sito, http://www.calcioitaliastory.it, funziona, ma queste righe sono alquanto fastidiose, soprattutto perché verranno altresଠviste dai motori di ricerca, il che non aiuta certamente i visitatori che non mi conoscono ancora.
Qualche altra soluzione da propormi in attesa che risolvano il problema direttamente da WP?
Grazie!
-
5 Settembre 2015 alle 7:59 #118617elmaniseroPartecipante
Fare le prove richieste dal box LEGGERE CON ATTENZIONE!! disattivando tutti plugin e mettendo un tema della serie twenty ed attivare uno alla volta i plugin ed il tema per individuare il/i colpevoli.
-
5 Settembre 2015 alle 8:37 #118620RobstevenPartecipante
Grazie Elmanisero! So già che disattivando tutti i plugin (il tema è già stato aggiornato), farei sparire la notifica. L’errore sta in tutte quelle risorse che non sono ancora state aggiornate seguendo le indicazioni del team WordPress. Disattivare il tutto mi creerebbe tra l’altro alcuni gravi problemi di navigazione, senza contare che lascerei il sito esposto allo spam bloccato da Achismet, ad esempio.
Ciò che non capisco, tra l’altro, è il motivo per cui, avendo il debug disattivato nel config.php, la notifica continua ad apparirmi!
-
5 Settembre 2015 alle 9:55 #118622elmaniseroPartecipante
Leggi bene la procedura
disattivando tutti plugin e mettendo un tema della serie twenty ed attivando uno alla volta i plugin ed il tema per individuare il/i colpevoli
Akismet non da nessun problema.
-
5 Settembre 2015 alle 12:16 #118625TittiModeratore
Se sei sicuro di non avere il debug “true” nel file di configurazione (controlla), allora lo avrai attivo in qualche altro modo (plugin, ad es.).
L’operazione richiesta (disattivare tutti i plugin e attivare un tema della serie Twenty) richiede solo 5-10 minuti e non procura nessun grave problema. E non conta se il tuo tema è stato aggiornato, attivare un tema di default è parte delle prove necessarie.
Una volta individuato il colpevole, comunichi qual è e la soluzione è molto semplice, possiamo dirtela noi (se riporti l’errore esattamente) o l’autore del plugin.
PS: leggere con attenzione le risposte è necessario quando si fanno domande, là si trattava di una sola riga eppure l’hai fraintesa comunque.
-
6 Settembre 2015 alle 9:56 #118632RobstevenPartecipante
Buon giorno,
di seguito riporto per esteso la notifica d’errore:
“Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece __construct()
. in /web/htdocs/www.calcioitaliastory.it/home/wp-includes/functions.php on line 3457″
Non ho avuto bisogno di cambiare il tema, aggiornato lo scorso giovedଠassieme a WP, mi è bastato disattivare tutti i plug in.
Ho proceduto riattivando uno ad uno quelli aggiornati in questi ultimi due giorni, non riscontrando problemi e poi gli altri.
Akismet voleva essere un esempio di plug in necessario, per il quale non mi è comparso l’aggiornamento, ma effettivamente funziona correttamente.
Al momento il bug mi compare riattivando due dei plugin che uso:
COUNT PER DAY (statistiche),
WP FILEBASE (per costruire una directory per il download di software).
di un problema generale che stanno già risolvendo, ma si tratta solo di anticipare un attimo i tempi!
Grazie e scusate!
Il debug nel mio file config.php è configurato a ‘false’, era la prima cosa che ero andato a controllare, anche perché, sinceramente, ero straconvinto di averlo cambiato in ‘true’ al momento d’installare wordPress.
Nel support wordPress all’indirizzo:
https://wordpress.org/support/topic/notice-wp_widget-is-deprecated-since-version-430
viene chiaramente spiegato che il problema riguarda l’uso di un “deprecated PHP 4 style constructors” per quanto riguarda i widget, e che molti editori di plugin devono porre rimedio al problema. Nel frattempo, quindi, consigliano di inibire il debug o di forzare il functions.php con la stringa che avevo postato nel primo messaggio, ma che non mi funziona.
Probabilmente quanto proposto da Titti, controllare che il debug non sia attivato nei plugin, fa proprio al caso mio, in attesa degli aggiornamenti risolutivi. Avrei bisogno di una dritta per sapere cosa devo guardare in particolare.
Se non avevo fatto tutte le prove canoniche qui previste, è solo perché avevo già letto che non erano del tutto necessarie. Si tratta di un problema esteso a più di una risorsa!
Scusate e grazie.
-
6 Settembre 2015 alle 16:59 #118635TittiModeratore
Allora per quanto riguarda il plugin wp filebase ti ho corretto il file, si chiama Widget.php e lo trovi nella directory /wp-content/plugins/wp-filebase/classes.
Scaricalo corretto da qui (clicca il bottone download) e poi caricalo via FTP sovrascrivendo l’originale e i notice ti andranno via (nel frattempo magari tieni disattivato count per day cosଠti rendi conto meglio che spariscono).
Poi attivi il plugin count per day e se anche quello ti da gli stessi notice e vuoi che provi a correggerlo, metti qui il link diretto al plugin che hai installato (avresti già dovuto farlo per entrambi) perché dal solo nome non posso esser sicura di quale sia.
-
6 Settembre 2015 alle 19:11 #118637RobstevenPartecipante
Grande Titti!!!
Il problema c’è anche in Count Per Day. Il plugin lo trovi a questo indirizzo
Quando puoi, se mi fai questo piacere, te ne sarei grato. Comunque, sistemando il Filebase, è già sparita la maggior parte delle notifiche.
Grazie infinite!
-
7 Settembre 2015 alle 8:11 #118639TittiModeratore
A me Count per day non dà nessun errore, e in effetti controllando il file counter.php, dove eventualmente andrebbe la correzione, pare a posto.
La versione è la 3.4.1 scaricata dal tuo link, forse tu hai una versione precedente. Prova a scaricare quella e caricala via FTP.
-
9 Settembre 2015 alle 8:16 #118655RobstevenPartecipante
No Titti! Purtroppo, dopo due giorni di forzata lontananza dal PC per impegni familiari, ho controllato la versione di Count Per Day installata sul mio sito ed è proprio la 3.4.1!
Penso che dovrò aspettare l’uscita dell’aggiornamento WP, nella quale si dice che verrà corretto il bug, ma ti ringrazio di quanto hai fatto!
-
9 Settembre 2015 alle 9:48 #118656TittiModeratore
Ho riprovato e confermo che a me in un test site (dove ho sempre il debug attivato) Count per day non provoca nessun messaggio. In ogni caso con il debug disattivato non dovresti vederlo quel messaggio, quindi posso solo pensare che il plugin stia cercando di eseguire una variabile (diciamo una opzione) che non esiste ma che hai attiva nelle impostazioni – cosa che a me non succede non avendo configurato il plugin né avendo dati particolari nel database.
Il consiglio quindi è rivedere le impostazioni del plugin, togliere gli eventuali widget (tipo quelle statistiche in fondo alla pagina, che tra l’altro si sovrappongono alle notizie), provare ad azzerare i suoi dati dal DB previo backup, controllare che tu non abbia la modalità debug attivata nel plugin (anche se quel messaggio non appartiene al plugin ma è di WP), controllare insomma le opzioni ma, meglio ancora, disattivarlo, perché non sarà la fine del mondo se per un po’ sospendi quei conteggi, molto peggio pubblicare tale nota, che ancora vedo nel tuo sito.
PS: tra l’altro hai problemi di caricamento, e la pagina manca del tutto di impostazione grafica. Pensa a cambiare tema, prima o poi. Cosଠcom’è si capisce ben poco.
-
11 Settembre 2015 alle 10:50 #118687RobstevenPartecipante
Grazie mille, soprattutto per i consigli! Avevo dei sospetti, soprattutto guardando il sito in modalità mouse del mio screen reader.
In realtà ho scelto questo temma per avere tutto su tre colonne: il contenuto della pagina al centro e ai lati i widget di statistica e navigazione. Sinceramente non riesco a capire se si comporta in questo modo.
Per il resto, vado a ricontrollare le opzioni del plug in!
Grazie ancora
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.