Extension talk:SemanticQueryFormTool/Archive

Will there be support for the new Storage Engine and will there be a SVN Repository for this Extension? Because then I could use this Extension on WeCoWi. --DaSch 09:54, 8 September 2008 (UTC)
 * Hopefully yes at some stage. I'll try to keep this 'old storage engine compatible' version (with all its limitations) working with upcoming SMW versions but any new SQFT version would long-term anyway only make sense if its working with the new storage engine. Optimale 14:14, 8 September 2008 (UTC)

Dependent Selection
Is there a possibility to make several mselect-boxes dependend on each other? I'm trying to have a search form that incudes (among other options) a search for countries, regions and villages/cities. Now it would make great sense, if one couldn't choose first a land and then a region that's NOT in the land you chose in the first place, and in the next step one shouldn't be able to select a city that isn't in the selected region.

Thats my code so far, it's heavily stripped from your example:

Results: -

(I'm using SMV-properties because I want to have a boolean AND within that search, and afaik that wouldn't be possible with built-in wikipedia categories.) Is there a way to make the mselect boxes dependend somewhat like this: Country A -> Regions in Country A -> Cities/Villages in Region B in Country A

Thx,

Simon -- 12:05, 15 September 2008 (UTC)


 * Sorry for the late reply.


 * Yes you can do something like that with the help of javascript functions which are attached to a field of the form with the 'js=' parameter. I use it in a very similar way like you describe (except in a different context - if a certain chromosome is selected from the 'chromosome' select element the values in another select element for 'bands' change accordingly to allow only those bands to be selected which are located on the selected chromosome(s)). It's however not very elegant as the javascript has to contain hardcoded the information e.g. which country has which regions and which regions has which villages/cities in order to enable the script to disable (gray out) or remove certain elements from the select list resp. add/enable them 'on the fly'. One can do some quite advanced stuff with the right javascript but it's basically not different at all from what one can do to control elements of a normal form in a normal HTML site using javascript.


 * I use the addscript extension to add javascript functions which I store in a file on the server. But in theorie the whole script could be added directly as value to the 'js' parameter. So would might have the extra parameter  which calls the js function select_disable if the country is changed and which than can modify the region select element depending on the country value.


 * Btw to have 'any=(alle)' is not useful as SMW only understands '+' and '?' as wildcard characters for ask queries; this parameter is more useful to switch the display of '+' or '?' OFF e.g. in lists.


 * Optimale 17:01, 24 September 2008 (UTC)

Database error: table .cmw_smw_atts2 doesn't exist
Hi,

after installation, I get the following error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "SQFTSMW::getSelectResult". MySQL returned error "1146: Table 'XXXX.cmw_smw_atts2' doesn't exist (localhost)". -Bernhard


 * Sorry about that. It was a bug - the database prefix was still hardcoded from the initial test :(
 * It should work now with version 0.1.2 on the ftp site
 * Optimale 22:54, 12 October 2008 (UTC)

Problems with MW1.13.2 and SQFT0.1.3
Hi all!

I don't know what I did, but the newest version of this extension (it's very helpful, many thanks for it!) does not work for me. I have a new installed MW1.13.2 and created two simple pages:
 * Page_one contains: Propertyname::one
 * Page_two contains: Propertyname::two

and a third:
 * Page_three contains:

but the option list of select tag is empty. I set the $wgShowSQLErrors and $wgDebugDumpSql variables to true in LocalSettings.php, but there are no error messages. The select tag appears nice. The page id's are there in prefix_smw_rels2 table. My SMW version is 1.3.

Can anybody help me? Thanks: Pipi69e 13:50, 30 October 2008 (UTC)

PS.: with type=article it works (it finds the correct property-page relations). Pipi69e 14:13, 30 October 2008 (UTC)

Pagename attribute causes MySQL error
Using pagename attribute causes the next error message: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "SQFTSMW::getSelectResult". MySQL 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 ')' at line 1 (localhost)".

The form works fine. Pipi69e 15:21, 30 October 2008 (UTC)


 * I think I finded an unnecessary closing bracket ')' on the end of 265. line of SemanticQueryFormTool/includes/SQFT_SQLFunctions.php. Deleting it solves the problem. Pipi69e 19:10, 30 October 2008 (UTC)


 * I just uploaded version 0.1.5 which hopefully resolves all bugs connected with retrieving property values of all types w/out specified namespace and/or pagename
 * Optimale 13:43, 6 November 2008 (UTC)

Update for SMW 1.4?
SQFT is currently (SemanticQueryFormTool_01_5.zip) not compatible with the newest SMW version. Would be cool if you could update it to make it work again :)
 * Version 0.1.6 is the last version compatible with <= SMW 1.3
 * Version 0.1.7 is the first version compatible with >= SMW 1.4
 * Optimale 10:51, 25 November 2008 (UTC)
 * Great, thanks :) --Pnagel 02:52, 26 November 2008 (UTC)

Simple #sask query for property of type Page doesn't work
Until now I always used SQFT's #sask for properties of type String. Now I wanted to use it with a property of type Page (explicitly specified in the Property page), but I only get a dropdown with a + in it, although there are >30 pages using the property. The query I tried was:

What am I doing wrong? --Pnagel 06:34, 9 January 2009 (UTC)
 * Sorry again for the late reply but somewho I don't seem to get the notification emails when this page is modified :(
 * Anyway it was a bug. I forgot in one place to replace the spaces of property names with underscores for the sql query. I corrected that now in version 0.1.9
 * Optimale 12:35, 26 January 2009 (UTC)

Example
This extension looks like it could be very useful. However, I tried to look at the example on malariapedia just now, but the site seems to be down. Do you know when that site might be available again or indeed if there is another place I could see a working example of this extension? Thanks Pnelnik 18:10, 17 February 2009 (UTC)
 * Unfortunately I don't really know of any other wiki where one could see the extension in action but the help.malariapedia.info site is up and should be accessible. It might be slow at times as it is a test site on an old server but the wiki will be moving to a new and hopefully faster hardware soon. So please try again to connect. Optimale 22:10, 17 February 2009 (UTC)
 * Maybe it's a result of the unusual port (14195) the webserver at mbi.molgen.mpg.de is running on - many company's firewalls or proxies will block outgoing traffic to this port. --Patrick Nagel 02:51, 18 February 2009 (UTC)

Thanks for the prompt response. I seem to be able to see the web-site today. Pnelnik 16:24, 18 February 2009 (UTC)

Combine two query conditions?
I'm currently mainly using #sask to generate tables with two columns, one containing property values, the other containing the number of times this value has been used. Now I'm wondering if it would be possible to get such a table that only contains the number of times a value has been used together with another condition, for example only matching pages that are in one specific category. Is it possible? --Patrick Nagel 08:00, 23 February 2009 (UTC)
 * Right now only those criteria can be used which are directly accessible within the SQL queries for the property values. These criteria are pagename and namespace. Using Category restrictions would mean to retrieve each page associated with a property value and do an extra DB search if that page is within a certain category or not. That would take too much time as the SQL queries are already time consuming if the number of properties is very high. So you can only restrict the result to matching pages within a list of pagenames or to pages within a list of namespaces. The other 'filter' action is after the retrieval purely based on the actual property values.
 * Well thinking of it there could be a 'trick' to restrict for Categories but I have so far never tested nor used it - so it might not work in practice:
 * In the 'article' mode a 'normal' #ask: query is used which can include Category: and it returns a list of linked pagenames. Most likely one has to somehow switch the linking off?
 * I'll see if I get it working and let you know. Optimale 13:44, 23 February 2009 (UTC)
 * I just made some modifications and from the next version it will be possible to feed a list pagenames to the pagename= parameter which is generated by a i.e. category specific #sask: type=article query e.g.:
 * but that could of course return a very long list of articles which might not work due to some limitation. But it works in principle. Optimale 16:25, 23 February 2009 (UTC)
 * but that could of course return a very long list of articles which might not work due to some limitation. But it works in principle. Optimale 16:25, 23 February 2009 (UTC)
 * but that could of course return a very long list of articles which might not work due to some limitation. But it works in principle. Optimale 16:25, 23 February 2009 (UTC)