Unexpected token '<', "<meta http"... is not valid JSON

Aperta
#1,539 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
javascript, php, wordpress
Ambito
backend, frontend

Direzione di ricerca

The "Check it!" button sends a request whose response is parsed as JSON, so the fix starts on the JavaScript side where that click handler and its fetch or AJAX call live, then the PHP endpoint it calls. Reproduce it first: the response body starts with a <meta tag, which suggests an HTML page such as a login, error or notice page is returned instead of the JSON. Done means the endpoint always returns valid JSON, or the client handles a non-JSON response without the parse error, and the intermittent case is explained.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When "Check it!" is clicked, this error message is displayed: Unexpected token '<', "<meta http"... is not valid JSON. The message does not appear every time the button is clicked.

Lingua principale
PHP
Stelle
365
Fork
135
Merge medio
1g 8h
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WordPress/plugin-check

Tutte le issue di WordPress/plugin-check

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.