Domanda

Ho un tema wordpress personalizzato che ha iniziato dando un errore di strano fuori dal blu.

Ogni volta che si posta un commento verrà restituito un avviso JavaScript con tutto il contenuto della pagina.

Non ho fatto alcuna modifica al tema che avrebbe effetto in questo modo non ho idea perché sta succedendo questo, ho provato a rimuovere tutto il javascript del tema, aggiornando i commenti relativi file sul server (lo stesso errore si verifica a livello locale) e la sostituzione del comments.php con un modello generico o utilizzando <?php comment_form(); ?> al posto di <?php comments_template(); ?>.

È possibile verificare in http: //www.faf. fi / Uutiset / FAF-international-ohjaajakoulutukset-alkavat-pian / (testo in finlandese, Nimi = Nome, Sähköposti = Email).

Tutte le idee?

È stato utile?

Soluzione

Ho provato a rimuovere tutto il javascript del tema, aggiornando i commenti che i file relativi a server (lo stesso errore accade a livello locale)

(Non è, ovviamente, fatto disabilitare che uno in fase di test)

Il problema è il risultato di questo file.
http://www.faf.fi/wp-content /themes/faf/scripts/js/functions.js

Blocco quello script nel browser risolve il problema, ma penso che sia questa zona dello script specifico che è in mancanza ..

    $('form').submit( function(){

        var form = $(this);

        if ( validateForm( this ) ) {

            $.post(
                form.attr('action'),        //url   A string containing the URL to which the request is sent
                form.serialize(),           //data  A map or string that is sent to the server with the request.

                //success   A callback function that is executed if the request succeeds
                function(response, status, request){
                    // do something with response
                    alert( stripTags(response) );
                }

                //dataType  The type of data expected from the server (text, xml, json)
            );
        }
        //Prevent default
        return false;
    });

L'avviso che stai vedendo è generata da quella funzione. Non ho idea di quale sia la causa del problema è né come risolverlo (io non sono esperto JS), ma sono abbastanza sicuro che questa funzione è la causa del problema.

La speranza che aiuta.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a wordpress.stackexchange
scroll top