Extension talk:Semantic MediaWiki/LQT Archive 1

The best way for getting support for Semantic MediaWiki is  is to post to its user mailing list. Comments made below are not very well monitored by the developers. There are various options for making yourself heard:


 * If you have a usage question, please post them to the SMW support mailing lists (archives).
 * If you found a bug or want to propose a new feature, please file it at MediaZilla. Bugs and requests are regularly considered by core developers and have a great impact on the future development of SMW.
 * If you want to contribute to the development, please contact the development community at the SMW developers' mailing list (archives).

When asking for help or describing bugs, do not forget to provide necessary details about your configuration, version details for all relevant components, information about other extensions that are used, and, if possible, a URL where the problem can be seen.

The below talk page is most useful for comments regarding the wiki page, but of course you may do as you like (it's a wiki, after all). --Markus Krötzsch 16:47, 19 January 2009 (UTC)

Creating a SemanticForm and using tags
Hi guys hope you can help. If I can get this working ok, this will be a MAJOR thing for us :>)

Example: Lets say I have an extension called NewTaskTag, which lets you insert a  into a wiki page, then you manually insert parameters as follows..

 Task = This task completed at.. Time = 6pm Priority = Severe Updated by =   Task = Time = Priority = Updated by = 

The extension then renders the html into a table like format.

Because this is a manual job, I wanted to make it easier to do this.

So, Ive installed Semantic Mediawiki along with SemanticForms.

These are great, but I wanted to know if you could use a form to do the above instead of using the normal edit option with Mediawiki.

The problem I see is how will the form know how to interpret and pass the entered bits/eg. the fields to the extension, and how would you say, in a form, place a filed to say to use ?

To further clarify what Im trying to say is the following.

If I want to use the  in a wiki page, I just go to a new page, click on Edit, and enter the following:

 Task = Time = Priority = Updated by =   Task = Time = Priority = Updated by = 

I then complete each line, eg.Task = This new task, Time = 6pm, etc etc.

What Id like to do is the following:

Create a new form that has this format:

Task: [___ Text Box for Task entry___] Time: [___ Text Box for Time entry___] Priority: [___ Text Box for Priority entry___] Updated By: [___ Text Box for Updated By entry___]

All the user would have to do is then input in the text boxes the required data, then the  would do the rest. The questions I have though are:

1)How would the form know that each text box is actually in the format: Task = --Roc michael 13:29, 28 April 2009 (UTC)

#ask sort
I am having an issue within the sorting function.

So, my desired end result is to have the table format I have within the template be sortable.

Here is the problem I encounter. When the table is first created the sorting is correct. When the sorting icon within the "Date" column is clicked to changing the sorting from descending to ascending the dates become out of order and can never achieve any type of logical order again (until the table is refreshed).

Now, to fix this I have used the following code:

This works, but I want the "mainlabel" result to display a linked image/icon or "View More Info..."

Thank you in advance for all responses and comments.

-Dgennaro 13:31, 16 July 2009 (UTC)

making a property without linking
Is there a way to make a property and not have an automatic link be generated from it? I read the SMW documentation on "Properties" and it eludes to this being possible but doesn't say how.--Iloveemeryville 23:35, 16 August 2009 (UTC)


 * Sure thing - add the property has type:String or has type:Number to the property page. (Alex Brown)

Dynamic Pagelist <= vs. => Semantic Mediawiki
I have started a Comparison of Dynamic Pagelist x Semantic Mediawiki. Please help to give valuable information for a good choice. --Jannis 19:19, 22 December 2009 (UTC)

Sémantique
Bonjour,

À mon avis, il est abusif de parler de wiki sémantique. La sémantique, ce n'est pas juste classer des mots par classes, sous-classes, propriétés, attributs ; ça c'est de la logique. La sémantique, c'est la signification, ce qui va des rapports pas forcement logiques entre les mots aux significations en contexte. Je ne vois rien de cela dans cette extension qui est tout au plus une manière plus sophistiquée de catégoriser des pages. 92.158.202.166 09:26, 29 December 2009 (UTC)

Missing Factboxes?
I have just installed SMW 1.5 in MW 1.14 (PHP and MySQL versions both 5.x).

I see the Special Pages, and I see the Types and Properties listed, but I see no Factboxes anywhere. I added a TestSMW page with the appropriate content, but no factboxes. Tried IE and FF (just in case) and disabled all other extensions, still no factboxes.

I'm concerned that I could only find one other guys with this issue...in the meanwhile, will verify I can get it going on a new wiki, again, just in case. Any ideas? --John Thomson 20:08, 21 March 2010 (UTC)


 * Found it, sort of. Looks like I have a problem with my custom skin that is preventing the Factboxes from appearing.  Digging now! --John Thomson 20:24, 21 March 2010 (UTC)


 * We're having the same problem here and it seems to be related to the skin configuration since the factboxes appear on some skins (like Modern) but not on other skins (like Monobook). Did you find anything on your side? Factboxes stopped working after upgrading MW from 1.13 to 1.15. --Mlirette 22:34, 19 July 2010 (UTC)

Recurring Events on SMW 1.5.0
Hi, if someone would like to use this parser function one should install the latest version of SMW available from trunk. This is due to intensive and helpful improvements since the latest stable release of SMW 1.5.0 Cheers --kgh 14:51, 23 April 2010 (UTC)

#show not working well with
Has anyone else encountered issues with #show not working well with ? Tisane 05:36, 10 May 2010 (UTC)

Sqlite
Interesting, but still doesn't work with sqlite. 90.31.177.152

SMW 1.5.1.1 breaks SCQ in MW 1.13.4
SMW 1.5.1.1 does not fully opperate correctly with MW 1.13.4. The only thing that I have found breaks is Semantic Compound Queries. It works great with MW 1.14

--Dgennaro

Show pages without a property
Hi, I know how to show all the pages of the wiki that, for example, have Location::London. I also know how to show all the pages that have a location info, but it's not London: Location::!London. Finally, I know how to show all the pages that have a location info: Location::+. However, I don't know how to show the list of the pages that don't have the Location property, so that I can generate that list in order to fullfill the missing information. Thanks! --Wikypedista 00:15, 9 July 2010 (UTC)

Adding templates?
Hi, I'd just like to know if it's possible to use the extension to add a new template each time you go to form edit? Rather than edit a template? For example, if I edit a forum and what to add this template each time I edit with form and want to add a new one each tiume, could FormEdit do that for that form only (as in, not for any other form)?--Technobliterator 19:14, 20 July 2010 (UTC)

Czech language
Hi, is it available also in the Czech language?--Juan de Vojníkov 14:19, 25 July 2010 (UTC)


 * Ano. Yaron Koren 04:15, 26 July 2010 (UTC)

Nice, was prepared for "ne".--Juan de Vojníkov 06:25, 26 July 2010 (UTC)

Putting default form in a template?
Is there any way to put a default form edit in a template? Like, does page has default form::foo work? Oh and thanks for your other answers.--Technobliterator 18:50, 28 July 2010 (UTC)
 * Sorry wrong talk page--Technobliterator 18:50, 28 July 2010 (UTC)

Edit with Form button?
So we'd like to add an image to the Edit with Form button, can you tell me what the button is called in the .css? Or how to make an image for it?--Technobliterator 12:45, 4 September 2010 (UTC)
 * Try installing "FireBug" for Firefox to detect and alter CSS Classes on the fly. Dunno if it helps but for me the "Edit with Form" Button is a list point with id="ca-form_edit". Using the Vector Skin myself.

Mediawiki is buggy all the sudden
the property pages are giving me Property:Subcategory of and Property:Modification Date

Database appears not to be updating
When I have the following wiki text:
 * Set Attr3: Attr3::value3
 * Attr3:

I would expect to see:
 * ''Set Attr3: value3
 * Attr3: value3''

But the second 'value3' above does not appear. The database is not updating as fast as it should. Over the course of 15 minutes, I did the following 10 times: but even still the call to: still didn't return anything. Also it seemed that old attributes were left from earlier versions that should have been removed from the data-base. Aberdeen01 05:07, 16 November 2010 (UTC)
 * Click 'Edit'
 * Made a very minor change to the text
 * Clicked 'Save'
 * Experiencing the same issue. I get updates only after i edit a page twice after changing a property and then using.

Best way to check property existance?
I'm currently messing around with the ParserFunctions extension to check existance of a property. However, the update rate is rather poor. This results in a wrong output on my templates that only can be corrected by editing a page twice.

Example: A template showing grafics depending on a Property "Type of Information"

Can this be optimized?

SOLUTION: #show in combination with Semantic Properties (and other parser commands)
As multiple people (including me) have the problem described above, here is my working quick and dirty solution:


 * 1) Edit LocalSettings.php
 * 2) Add the line: $wgEnableParserCache = false;

Note: $wgCachePages = true; can be left as is to increase Wiki performance.

This results in an instant update of #shown properties in the wikitext which allows insta-switching of template output depending on a given parser-condition (i.e. #switch)

Cons: May negatively influence wiki performance in parser-heavy situations. Probably has any other severe effects that i don't know about.

A way to query starting from a certain page within a category?
Hi,

I want to create an alphabetical navigation (back, forward) from ~18000 images within a certain category. Now: how can I ask for the member before and after the current page? I tried several things, but I don't want to read out all entries from the database, just the members before and behind. As far as I know it's not possible, is it? With the API I can achieve this by fetching two results sorted in ascending and descending order when the current page is named for instance File:File10.jpg: /o/api.php?action=query&list=categorymembers&cmtitle=Category:MyLargeCategory&cmdir=asc&cmcontinue=FILE10.JPG| /o/api.php?action=query&list=categorymembers&cmtitle=Category:MyLargeCategory&cmdir=desc&cmcontinue=FILE10.JPG| The first will give me File:File10.jpg, File:File11.jpg, File:File12.jpg etc. and the second will give me File:File10.jpg, File:File09.jpg, File:File08.jpg, File:File07.jpg etc. So I can get follower and forerunner. Can this be done with #ask? Something like. If not, could this be implemented in the future to build a browsing through categories? --Andreas 23:30, 14 January 2011 (UTC)
 * Well I can answer this myself: just use an additional property with the > and < operator:

But remember these alphabetic ranges will work only for a string property. --Andreas 23:45, 14 January 2011 (UTC)

Piped links?
I have a couple of string-type properties whose values contain one or several URLs. I would like to be able to have them displayed as piped links in inline queries. By default, square brackets are not allowed in properties (and setting $smwgLinksInValues to true would probably pose a risk to the system), so I was wondering if inline queries could be tweaked in such a way that URLs are shown as piped links or alternatively as numbered links. For instance, is there a way one can wrap two square brackets around the requested property values? Or to define placeholder symbols in the property value and then to have the placeholders replaced with square brackets in the inline query? Regards, Cavila 09:24, 18 January 2011 (UTC)


 * Check out the "template" format. Yaron Koren 13:19, 18 January 2011 (UTC)
 * Thanks, that's what I suspected and what I've been focusing on so far, but the SMW documentation is a little sparse for a newbie like me. The idea described here is to render results as plain text and then to relink them in the format template (eg. [ ] for a numbered link, I suppose?), but the symbol # (as in ) does nothing to remove the external link. Having multiple values per property per page (i.e. per row) may also present something of a challenge. An example:


 * {| class="wikitable"

! inline query ! format template "Template:X"


 * Recipe = property of type "Text"
 * URL = property of type "String"

The recipe is: "". It is described on the following websites: [ ].


 * 1 = recipe; 2 = URLs
 * }
 * ... is the wrong way to go. Cavila 23:47, 18 January 2011 (UTC)


 * Okay - as noted above, the mailing list is probably the best place for this sort of question. Yaron Koren 01:21, 19 January 2011 (UTC)
 * Well, it's the lack of anonymity that kept me from directing my questions to the mailing list, but I've found another workaround anyway: Extension:Labeled Section Transclusion. I don't know if it can handle large sets of data without straining the server too much, but for more modest purposes it seems to work very well. Cavila 10:18, 20 January 2011 (UTC)

Duplicated tableheader sort-arrows and Js-error
When creating normal inline queries (table output) on any wiki page the clickable header icons look normal. But whenever i put the query on my mainpage i have two sort-arrows show up in the header instead of one per property. Also i get theses JS errors shown in the IE8 status bar when i click one of the arrows: Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; FDM) Timestamp: Thu, 3 Feb 2011 08:01:19 UTC

Message: 'undefined' is null or not an object Line: 213 Char: 2 Code: 0 URI: http://localhost/wiki/extensions/SemanticMediaWiki/skins/SMW_sorttable.js

Message: 'undefined' is null or not an object Line: 132 Char: 2 Code: 0 URI: http://localhost/wiki/extensions/SemanticMediaWiki/skins/SMW_sorttable.js

I'm using: SMW Version 1.5.5 on MW 1.16 (Mike)

Making the inline query list pages that do not have a property set?
I currently have some wiki articles set up where I use a template to mark certain pages as "Unapproved". The template comes with a "Approved::No" property that also marks that page as unapproved.

Ideally, I would like to have a query that searches for all the pages in a category that does not have the "Approved" property. Is this currently possible? --Gossamer 00:36, 8 February 2011 (UTC)


 * So you're trying to show not pages with a property but instead the ones missing it? Sounds rather impractical to me since you could get a lot of unwanted "sideload" from this query in terms of different namespaces or "non-content" pages that you don't want to display at all. My suggestion would be giving your pages a "non approved" property by default (i.e. upon their creation, within their template, default values, etc.). Assigning them to a special (hidden) category (i.e. "Draft") also helped me a lot with the later queries since i can narrow these down with ease. (Mike)


 * I have a similar issue, if Wildcards are written as "+" and allow any value for a given condition. For example, born in::+ returns all pages that have any value for the property «born in». What is the wildcard for when there is no value? In the example below I am trying to find the pages where the review date is still blank - what should be where the (?) is in Date for review::?

Thanks, Rich

{{#ask: Date for review::? format = broadtable
 * ?Name of policy owner
 * ?Creation date
 * sort=Creation date
 * order=DESC |
 * limit=10
 * mainlabel= etc etc

variable inside brackets in an ask
I have a table which I am trying to populate with a nested ask.

{ !Thumbnail !Member


 * }

Template:PeopleTable is defined as

|  ||  | |-

In the : parameter evaluates to 'empty' but   on its own transcludes as expected.

Any ideas greatly appreciated.

sementic mediawiki doesnt supported oracle?
Dear all

Here same i have installed mediawiki1.17 with oracle database.it working fine but whenever i add extension like sementic mediawiki,external data, give some error. how can i remove the error. and search option also not working.

if mediawiki cant work with oracle then why oracle as a database there in installation. please give some suggestion..

error: databaseOracle:doQuery" database returned error "942:ORA-00942 table or view does not exist...

Property as part of link?
I currently have a field set up that allows a user to fill in their own name and mark themselves as the author of an article.

author::

Ideally, I would like this to automatically link to that member's user page on the wiki.

I tried the following, but that didn't seem to work. user:[[author::]]

Is this possible? Posted by User talk:Gossamer on 30 May 2011


 * I don't think so. You're trying to embed a semantic property within a regular internal link. Regardless of the data type your property belongs to (page, string, type, etc.), that's not supposed to work, but there's a workaround:  would assign to a value to the property 'author' without displaying anything to the page, and User: would give you a link to the user page. Hope that helps. Cavila 14:20, 24 June 2011 (UTC)

Italics in property type 'Text'?
A normal query for properties with the type 'text' fortunately preserves italics. However, when the limit is set to zero so that a link is provided rather than the actual results, the new query does not render any italics, instead showing the double apostrophes that are used in the wiki markup for italics. Is this a known bug or an ordinary database issue? Cavila 16:00, 21 June 2011 (UTC)

A new bug?
Normally, when a query is limited to a predefined maximum number of results (e.g. ), one can click a link and continue browsing a table which contains all results. I know this feature is somewhat limited (see my comment abouts italics not being rendered, for instance; also,  can't be suppresed; etc.), but since MW 1.17 and SMW 1.6, there's a more serious defect: the "next 20" button sends me to a Special:Ask page, rather than allowing me to continue. The page is mostly empty except for the "limit" field, which is pre-filled with a long string containing parts of the query. So the inevitable question is: is this a new bug? Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 15:00, 14 August 2011 (UTC)
 * For the record, SMW 1.6.1 has just been released. Although there appears to be a new, possibly related bug (escaping issues?), the one I reported here has been taken care of! Many thanks, Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 18:55, 22 August 2011 (UTC)