Altes Köln

Schulkarte

Aus Altes Köln
Wechseln zu:Navigation, Suche

Schulkarte Diagnose

1) Roh-SMW-Ausgabe

(zeigt, ob SMW überhaupt Daten liefert)

[
{{#ask:
 [[Kategorie:Schule]]
 |?Schule=name
 |?Koordinaten=coords
 |?Schultyp=type
 |format=list
 |template=SchulJSON
 |sep=,
 |headers=hide
 |plain=yes
 |link=none
}}
]

2) JSON-Debugdaten für Script

<script id="smw-data" type="application/json"> [

{

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}

, {

 "name": "",
 "type": "Unbekannt",
 "coords": ""

}


] </script>

Datenloader läuft …

<script> (function(){

   var el = document.getElementById("smw-data");
   var dbg = document.getElementById("debug");
   if(!el){
       dbg.textContent = "❌ FEHLER: smw-data Element fehlt – Query wurde nicht erzeugt!";
       return;
   }
   var raw = el.textContent.trim();
   dbg.textContent = "✍ Rohdaten erhalten:\n\n" + raw;
   try {
       var json = JSON.parse(raw);
       dbg.textContent += "\n\n✔ JSON ist gültig – Beispiel erstes Objekt:\n" +
           JSON.stringify(json[0], null, 2);
   } catch(e){
       dbg.textContent += "\n\n❌ JSON FEHLER:\n" + e.message;
       dbg.textContent += "\n\nHinweis: Vermutlich wird {{#ask}} nicht geparst.";
   }

})(); </script>


Erklärung

  • Feld 1 zeigt die SMW-Abfrage roh — wenn hier **{{#ask** sichtbar bleibt**, wird SMW nicht ausgeführt.
  • Feld 2 wird vom Script eingelesen und als JSON validiert.