Hi Yaron (and all readers :-)
we are using Semantic Drilldown (Version 1.2.4) together with Semantic MediaWiki (Version 1.8) and browsing data using http://terms.gbif.org/wiki/Special:BrowseData/Concept on our Terms-Wiki a database query syntax error has occurred. This happens only with the specified Category:Concept (http://terms.gbif.org/wiki/Class:Concept) which has 6 filters on it (the debug output is given below). The browsing of data works fine until I add the filter Issued (http://terms.gbif.org/wiki/Filter:Issued) which also sets „Month“ as time period. I tested step by step and figured out that only filter specifications that set [[Uses time period::Month]] or [[Uses time period::Year]] cause this SQL error. I hope the debug message gives you a point to start from. We also did the upgrade procedure migrate from 1.7.1 to 1.8.0
php SMW_refreshData.php -v -b SMWSQLStore3 -fp
php SMW_refreshData.php -v -b SMWSQLStore3
I read the SMDrillDown PHP code, I'm not sure if it has to do with temporary tables?
Can this be solved? Thanks a lot!!!
kind regards
Andreas
- debug messages for http://terms.gbif.org/wiki/Special:BrowseData/Concept ---
Background: Category:Concept has 6 filters specified, 2 among them [[Uses time period::Month]] these [[Uses time period::Month]] or [[Uses time period::Year]] causes the following debug output (we have a MediaWiki 1.20.2 core installation)
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
SELECT YEAR(), MONTH(), count(*) FROM semantic_drilldown_values sdv JOIN smw_di_blob a ON sdv.id = a.s_id JOIN smw_object_ids p_ids ON a.p_id = p_ids.smw_id WHERE p_ids.smw_title = 'dcterms:issued' GROUP BY YEAR(), MONTH() ORDER BY YEAR(), MONTH()
from within function "". Database returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), MONTH(), count(*) FROM semantic_drilldown_values sdv JOIN smw_di_blob a ' at line 1 (localhost)".
Backtrace:
#0 /usr/share/mediawiki20/includes/db/Database.php(916): DatabaseBase->reportQueryError('You have an err...', 1064, '?SELECT YEAR(),...', '', false)
#1 /usr/share/mediawiki20/extensions/SemanticDrilldown/includes/SD_Filter.php(244): DatabaseBase->query('?SELECT YEAR(),...')
#2 /usr/share/mediawiki20/extensions/SemanticDrilldown/includes/SD_Filter.php(269): SDFilter->getTimePeriodValues()
#3 /usr/share/mediawiki20/extensions/SemanticDrilldown/specials/SD_BrowseData.php(724): SDFilter->getAllValues()
#4 /usr/share/mediawiki20/extensions/SemanticDrilldown/specials/SD_BrowseData.php(922): SDBrowseDataPage->printUnappliedFilterLine(Object(SDFilter), '/wiki/Special:B...')
#5 /usr/share/mediawiki20/includes/QueryPage.php(527): SDBrowseDataPage->getPageHeader()
#6 /usr/share/mediawiki20/extensions/SemanticDrilldown/specials/SD_BrowseData.php(121): QueryPage->execute('Concept')
#7 /usr/share/mediawiki20/includes/SpecialPage.php(611): SDBrowseData->execute('Concept')
#8 /usr/share/mediawiki20/includes/SpecialPageFactory.php(494): SpecialPage->run('Concept')
#9 /usr/share/mediawiki20/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#10 /usr/share/mediawiki20/includes/Wiki.php(536): MediaWiki->performRequest()
#11 /usr/share/mediawiki20/includes/Wiki.php(446): MediaWiki->main()
#12 /usr/share/mediawiki20/index.php(59): MediaWiki->run()
#13 {main}
- debug messages for http://terms.gbif.org/wiki/Special:BrowseData/Concept ---
Version: REL1_20-branch
Severity: critical
URL: http://terms.gbif.org/wiki/Special:BrowseData/Concept