It looks like the main issue is that more than one SMW ID is being generated for the same page, which as I understand it shouldn't happen. This could be a bug that was fixed in SMW 1.4... although Semantic Drilldown should probably, at the very least, exit more gracefully than by displaying a SQL error.


On Wed, Nov 26, 2008 at 12:52 PM, Asheesh Laroia <asheesh@creativecommons.org> wrote:
First of all, I hope the Americans on this list are having a happy time this
holiday period!

I wanted to get some feedback about an issue we're having with Semantic
DrillDown.  At
http://learn.creativecommons.org/community/Special:BrowseData/Organization ,
you can click through to
, which reported the error I gave in the subject.

I did just turn SQL query error logging on; it tells me the query was:

    SELECT DISTINCT ids.smw_title AS title, ids.smw_title AS value,
ids.smw_namespace AS namespace, ids.smw_sortkey AS sortkey FROM `smw_ids` ids
JOIN `smw_inst2` insts ON ids.smw_id = insts.s_id AND ids.smw_namespace != 14
JOIN `smw_atts2` a0 ON ids.smw_id = a0.s_id WHERE insts.o_id IN (SELECT smw_id
FROM `smw_ids` cat_ids WHERE smw_namespace = 14 AND (smw_title =
'Organization')) AND a0.p_id = (SELECT smw_id FROM `smw_ids` WHERE smw_title =
'License_provider' AND smw_namespace = 102) AND (a0.value_xsd = 'CC') ORDER BY
sortkey LIMIT 250

If the subquery returned more than one row, let's see what it returns:

mysql> SELECT smw_id FROM `smw_ids` WHERE smw_title = 'License_provider' AND
smw_namespace = 102 ;
| smw_id |
|     32 |
|     51 |
2 rows in set (0.00 sec)

I don't think I've done anything too weird to the wiki, just importing some
data (in MW XML format) and running SMW 1.3 and SF 1.3.4 and Semantic Drilldown
0.4.8 (current svn trunk from 10 minutes ago).

I've taken a database backup in case anyone wants to take a look (if there's
interest, I can change the user passwords and publish it), and now I've run:

$ php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php  -f -v

That seems to have fixed the Special:BrowseData that reported a SQL error. But
pray tell, why was it necessary, and how can we avoid having to again? (-:

-- Asheesh.

Q:      How many Marxists does it take to screw in a light bulb?
A:      None:  The light bulb contains the seeds of its own revolution.

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Semediawiki-user mailing list