Issue/SRF/172

De Semantic MediaWiki - Sandbox

Bug demonstration for Semantic Result Formats Issue #172 (https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/172)

Control using datatables format[modifier | modifier le wikicode]

 
{{#ask: [[Capital of::+]]|?Located in|format=datatables}}

Result[modifier | modifier le wikicode]

Control using broadtable format[modifier | modifier le wikicode]

 
{{#ask: [[Capital of::+]]|?Located in|?=City|format=broadtable|mainlabel=-}}

Result[modifier | modifier le wikicode]

Located inCity
Alexey Gorobecky
Angoulême
GreeceAthens
IndiaBangalore
ChinaBeijing
GermanyBerlin
GermanyDemoBerlin
DemoSMW
GermanyDemoSMW2017
GermanyDemoSW
GermanyDemoSWErrors
GermanyDemoSWM
GermanyDemoSWUth
Helsinki
Indonesia
IndonesiaJakarta
England
United Kingdom
London
München
California
Sacramento County, California
Sacramento (CA)
Vkopey/Sandbox
PolskaWarszawa

Bug in datatables format[modifier | modifier le wikicode]

 
{{#ask: [[Capital of::+]]|?Located in|?=City|format=datatables|mainlabel=-}}

Result[modifier | modifier le wikicode]

Notes[modifier | modifier le wikicode]

The above datatable:

  • Generates a Javascript popup saying DataTables warning (table id = 'DataTables_Table_1'): Requested unknown parameter 'City' from the data source for row 0
  • Once the popup is dismissed, the table finishes loading but the City column is left blank.

I also noticed that when I am logged in, after editing the page, the behaviour changes and datatables fails to load at all, with the following error message in the Javascript console (no popup):

Exception in module-execute in module jquery.dataTables.extras:
load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:178 TypeError: Cannot read property 'aTypes' of undefined TypeError: Cannot read property 'aTypes' of undefined
    at eval (eval at <anonymous> (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:4:681), <anonymous>:170:1011)
    at eval (eval at <anonymous> (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:4:681), <anonymous>:171:303)
    at Object.<anonymous> (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:163:74)
    at fire (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:45:122)
    at Object.add [as done] (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:45:656)
    at Object.always (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:46:874)
    at runScript (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:162:955)
    at checkCssHandles (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:163:774)
    at execute (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:164:477)
    at Object.implement (http://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:170:737)log @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:178handler @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:155fire @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:45fireWith @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:46fire @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:46track @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:155runScript @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:163checkCssHandles @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:163execute @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:164implement @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:170(anonymous function) @ VM430:170(anonymous function) @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:4globalEval @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:4work @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:166request @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:165load @ load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=feYQYEvp:172(anonymous function) @ 172_(SRF):215startUp @ load.php?debug=false&lang=fr&modules=startup&only=scripts&skin=vector:43script.onload.script.onreadystatechange @ load.php?debug=false&lang=fr&modules=startup&only=scripts&skin=vector:43

This is not the error I am seeing in my own installation. When I log out of the sandbox the error goes away. When I log back in to the sandbox it seems to work again, until I edit this page. This is not the original bug that I was concerned about but I thought to keep some notes here as to what is happening in case someone else comes across the same issue and needs to fix it.

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.