Extension talk:Semantic Drilldown

Filters show up in BrowseData, but empty
Odd problem: my filters do show up in Special:BrowseData, but the properties they are supposed to cover don't. Some of them even have a "Has label" tag, but that doesn't apply. It's weird because they were working until a few hours ago. I made a lot of tests, I even renamed the Category, moved all tags from the old category to the new one, changed the category tag in every relevant page (from the old name to the new one), applied nulledits to all property and filter pages, but no way: in property pages all values are fine, in filter pages the names of the covered properties are fine, in the category page the names of the filters are fine, but still: in Special:Browse Data I can see all filters, but no values. Note that I can see below the whole list of pages in the category. Again, everything was fine until a few hours ago. The only change I have made that may have interfered with Drill Down is deleting the category "General Templates" from my Templates using Replace Text extension. I read above that Stormraven used the same extension... Help?

Davide 05:05, 11 May 2009 (UTC)

Category sort order
I've got a character on my gaming wiki whose article is named "Shining Talon" Mandus, with the quotation marks (here). The article name is sorted as Shining Talon Mandus, without quotation marks, by using the pipe trick to create an alternate sort order (here). But on the Drilldown page Special:Browse data, the alternate sort order is not used (here). I'd like to see this addressed. Thanks! Stormraven 00:53, 6 September 2008 (UTC)

Using #ask in drill down or using a query form
Suppose we have a global wiki of sports clubs and their membership fees. We have 10,000 cities and towns and 300 types of sports club. A user wants to know what are the fees charged by tennis clubs in his city. The #ask function could be used to produce a nice table of results. But, is there any way we can use drill-down to allow the user get that table? Requiring the user to build his own page using the #ask function is not practical if we want the site to have a wide user base. It is not nearly user-friendly enough. As it requires the user to know a lot about the wiki, its data structure and the syntax used by #ask. On the other hand asking the site administrator to build 10,000 * 300 pages each with an #ask function for every city - sports_type combination, is not very practical. It would mean that every time someone adds a new sport type the admin would need to add 10,000 new pages, with an #ask function for each city. Also I don't think that it is idea to expose the word 'subcategory' to the users. In our implementation the data will be arranged in terms of categories, subcategories, properties etc. But that is an implementation detail which should definitely be hidden from the user. In my example above, the user should just need to choose 'city' and 'type of sport'. On the other hand if we use the forms module we can get very very close. But I found a couple of problems. For example suppose we use the existing semantic forms to create a query form example Then either we relabel the 'Save Page' button as 'Run Query' and then On the other hand if we relable the Show Preview as Run Query, then
 * If two people are running a query at the same time, one user may see the other user's results
 * The default data that is in the form is whatever the last user queried
 * The user needs to do some authentification before the results can be displayed, i.e. he may be forced to log-in, or recognise some curvy letters in an image.
 * the result page contains lots more than we require, for example at the top of the page it has This is only a preview; changes have not yet been saved!. It also has a Save Page button at the bottom

But it seems to me that the tweek required to get the existing forms working as query forms is really a very small job from a coding point of view. We just need a button, with default name Run Query which does something really similar to show preview, but Run Query will present to the user a window that has much less, i.e. it won't have the Facts About box. It won't have the big text edit box, it won't have the Save Page button. If it were implemented, I reckon it would be really really useful Pnelnik 12:45, 29 October 2008 (UTC)


 * Is this a question about Semantic Drilldown or Semantic Forms? :) Yaron Koren 13:11, 29 October 2008 (UTC)


 * I guess the first question is, could we use drilldown to let the user get a table of tennis club fees in his city in some user friendly way? And I'm assuming there are thousands of citys in the world, hundreds of sports (club) types and the #ask function is able to give us exactly the table we want. Thanks, Pnelnik 16:33, 29 October 2008 (UTC)


 * There are some planned changes coming to SD that might allow that. Yaron Koren 16:37, 29 October 2008 (UTC)

Problem with SMW 1.4
"Error when entering Special:BrowseData with SMW 1.4" :-(

Same here, error shown by Firefox:
Catchable fatal error: Argument 2 passed to SMWSQLStore2::getPropertyValues must be an instance of SMWPropertyValue, instance of Title given, called in \Root\extensions\SemanticDrilldown\includes\SD_GlobalFunctions.php on line 342 and defined in \Root\extensions\SemanticMediaWiki\includes\storage\SMW_SQLStore2.php on line 337


 * This should be fixed in the new version, 0.5; please try it out and let me know if there's a still a problem. Yaron Koren 04:17, 4 December 2008 (UTC)


 * I am having this problem aswell. Here is the error message:


 * Our wiki is located at http://project-valhalla.org/ . Using Semantic Drilldown (Version 0.5.3) If you need more info or think you can help me, please drop a line here.
 * Where is this error message happening? I can't see it on your site. Yaron Koren 14:58, 3 February 2009 (UTC)
 * Sorry about the lack of detail. It happens when edit this page (and others like it). I click edit, then preview and when I try to save it, that error appears. -- Veli
 * Okay, that's not Semantic Drilldown. It looks like your problem is coming from the Semantic Tasks extension, which hasn't been updated for SMW 1.4+ yet. Yaron Koren 16:14, 3 February 2009 (UTC)
 * Thanks alot! Ill start looking at that then. Veli

Hiding predefined Halo categories
Just a quick tip. Halo creates some predefined categories that don't show up in Special:Categories. Should you want to hide them - Transitive properties, Symmetrical properties and Gardening Log, just enter Category:Transitive_properties, Category:Symmetrical_properties and Category:GardeningLog and do the Subcategory Other trick.

--Jnatividad 21:35, 19 December 2008 (UTC)

Installation ... Upgrade?
Is there any issue when upgrading this extension? --Dmb 15:08, 22 January 2009 (UTC)


 * Support for old versions of Semantic MediaWiki gets removed from time to time; you can check the version history. Yaron Koren 15:47, 22 January 2009 (UTC)

Undefined variable: wgAmericanDates in SD_BrowseData.php on line 630
I get the following PHP Notice when I try to BrowseData on a category that "Has filter" with an input type of "date range": Notice: Undefined variable: wgAmericanDates in /path/to/wiki/extensions/SemanticDrilldown/specials/SD_BrowseData.php on line 630

I have tried explicitly setting "$wgAmericanDates = true" in LocalSettings.php, and the error remains.

Version Details:
 * MediaWiki 1.14.0
 * PHP 5.2.6
 * MySQL 5.0.45
 * Apache 2.2.3
 * OS: CentOS 5.2 (Linux Kernel 2.6.18-92.1.6.el5)

Semantic Extensions: --74.164.199.186 23:23, 23 March 2009 (UTC)
 * Semantic MediaWiki 1.4.2
 * Semantic Forms 1.5.4
 * Semantic Drilldown 0.5.4


 * Looks like you've found a bug. It'll be fixed in the next version of Semantic Drilldown, which will hopefully be released soon. Yaron Koren 23:39, 23 March 2009 (UTC)

Filters not displaying - Table 'wikidb.smw_attributes' does not exist
Hi Yaron and all:

Having an issue with getting my filters to show up on the BrowseData page. I have articles that have the properties I am trying to filter on, but when I click on the category in my BrowseData page, I get the following error:

Database error

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

 CREATE TEMPORARY TABLE semantic_drilldown_filter_values ( id INT NOT NULL, value VARCHAR(200) NOT NULL, INDEX sdfv_id_index(id) ) AS SELECT subject_id AS id, value_xsd AS value FROM `smw_attributes` WHERE attribute_title = 'Affects_Geographic_Region'

from within function "". MySQL returned error "1146: Table 'wikidb.smw_attributes' doesn't exist (localhost)".

Any idea as to where I veered off course? My install is MW is:

MediaWiki 	1.13.4 PHP 	5.2.8 (apache2handler) MySQL 	5.1.30-community-log

Thanks,

Dave Manzolillo DManzolillo-at-LMI.org

'''Update: Once I disabled Halo it worked. Thanks!'''

Has anyone been able to get SMW forms and drilldown to work with the Halo extension? The more I get into trouble, I find that disabling Halo/SMW+ extensions fixes my issue....


 * An ideal solution to this problem is right now being discussed on the SMW mailing list. Until there is one, there's an easy workaround in the SD code, that I plan to add in the next version. Yaron Koren 03:51, 1 April 2009 (UTC)

Filter Stopped Working
Hi. One of my filters has just stopped displaying in my browsedata page.

The property is still there and named the same. There is data in it.

Is there a limit on the number of objects in a filter?

The Filter: This filter covers the property Covers property::Manufacturer.

The Property: This is a property of type Has type::Page. It links to pages that use the form Has default form::Straight Razor Manufacturer.

Thanks.


 * No, there's no limit. Did anything change between when it worked and when it didn't? An extension upgrade, perhaps? Yaron Koren 03:52, 1 April 2009 (UTC)


 * I created a subcategory called "Manufacturers". Cannot think of any other changes.

Articles that belong to a Namespace are not listed but still counted in the Category
Hi all,

I am using Semantic Drilldown Version 0.5.6.

I noticed that when an article belongs to a namespace (e.g. KB in my case), the article will be counted in the category. However the article will not be returned in the list. I get the following message when all the articles of a category belong to a custom namespace:

There are no results for this report.

If I modify an article that does not belong to any Namespace and add it to the category, the article is properly listed.

Is this a normal behaviour? I am not good at PHP so it will take me few hours or more to understand how the extension is selecting which article is displayed, but if needed, I will do it :) . Is there an option I could configure to allow articles from specific namespaces to be returned?

Anyone faced the same problem? I searched but could not find anything about it, I apologize if it has already been answered.

Thank you. Yann.


 * Hi, I don't understand - if you create an article in the "KB" namespace, it gets added to a category automatically? What do you mean by a category here? Yaron Koren 12:46, 27 April 2009 (UTC)

No it is not added automatically to the namespace, sorry for the confusion. I use a form + template to make this happen. I mean by category that the following text is present in a page/article: [ [ Category : KB ] ] I added spaces on purpose here to avoid it to be parsed.

So basically if I have two articles with the category set with the following names:

KB:Article1 and Article2

only the second article (Article2) will show up in the list whereas both are counted on the top right box named "Choose a category" where you can switch between categories.

EDIT: I ended up by not putting the articles of the KB category in a custom Namespace


 * Okay, it looks like you've found a bug in Semantic Drilldown - namespaces that don't have SMW enabled for them don't show up in 'BrowseData'. Yaron Koren 15:27, 29 April 2009 (UTC)

Special:Browsedata showing incorrect category counts
Using this extension (0.5.6) on MW 1.15.0 with SMW 1.4.2, SRF 1.4.4. I have not started to try using any filters yet, but in "Special:BrowseData", all of the article counts on categories seem to range from 60% - 100% above the actual number of articles in the category. It seems that articles in multiple categories are being counted as one an instance of each the category to which it belongs (with ~600 articles, I'm not going to check each one to confirm, but eyeballing it, it seems right).

For example (not an actual example, but it's simpler to explain here), it will read:

"Fruit (300)" when there are only 200 articles in that category, "Edible yellow things (2)" when there is only 1 article in that category (Banana), but that article also belongs to the category "Fruit".

I'm not sure what the issue is (I know very little about PHP and less about MySQL), but perhaps this has something to do with the way the categorylinks table is handled in lines 150 or 203 of SD_BrowseData.php?

Drilldown using multiple values for in a single filter
Is it possible to drill down by selecting a multiple values for a single filter? For example, the following page has a filter based on an extensive list of keywords: http://www.structuralwiki.org/en/Special:BrowseData/Software?_single. I would like to be able to drill down by selecting two keywords in the first filter. However, as soon as I select one keyword, all the the other keywords in the list disappear and "(Add another value)" message appears. How can I add this another value? Thanks. Andrewok 03:44, 10 September 2009 (UTC)


 * You need to click the little arrow next to it, and that will display all the values again. It's a rather cryptic interface, I admit, and if you can think of something better (maybe just better text, maybe more than that), I'd like to hear it. Yaron Koren 03:59, 10 September 2009 (UTC)


 * I was thinking that perhaps the text "(Add another value)" could be a hyperlink with the same functionality as the little down arrow. I also noticed that selections from different filters are treated as AND condition, while selections of multiple values from a single filter is treated using OR condition. Sometimes desirable to select multiple values from the same filter using AND condition. I was able to achieve this functionality by using several filters for the same property (such as "keyword 1", "keyword 2", "keyword 3"), with each subsequent filter requiring selection to be made on the previous filter. Perhaps it would be worthwhile (if possible) to directly implement choice of OR or AND condition for multiple values selected from the same filter. It could be presented to the user as two hyperlinks: ("Add another OR value", "Add another AND value"). Andrewok 00:17, 13 September 2009 (UTC)

Excluding categories from the drilldown
Perhaps it's possible to exlude categories from the drilldown by adding "__HIDDENCAT__" to the category page. If I do so, it is excluded from drilldown - --Ulli 757 08:08, 4 October 2009 (UTC)


 * That's a very good idea. I had thought of excluding via a semantic property, or a special category, but never via a magic word; and that seems like the best solution. I'll try to add something like that in, but maybe call it __HIDEFROMDRILLDOWN__ instead. Yaron Koren 18:27, 5 October 2009 (UTC)