Discuss Concepts

From semantic-mediawiki.org

Please note Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.

In case you are seeking support concerning individual questions, please have a look at this page.

The Semantic MediaWiki user mailing list is always a good idea for seeking help.



  [[Concept:Semantic Web events 2008]] [[located in Germany]] 

be changed into

  [[Concept:Semantic Web events 2008]] [[located in::Germany]] 

? --Toka 14:32, 2 February 2010 (UTC)

Yes it should! Good catch. Yaron Koren 00:00, 4 February 2010 (UTC)

Browsing Concepts[edit]

Anyone know of a way to browse all concepts; similar to a "Special Page"?

You can go to Special:AllPages, then select the "Concept" namespace. Yaron Koren 19:25, 7 June 2010 (UTC)

Sort pages and include properties[edit]


I often use the concept to assemble a list of values to choose from in a form and I would like to be able to choose an order and to add a property of the pages. Would that be possible?

Regards, --AdSvS 14:53, 1 July 2010 (UTC)

Try "show on select"[edit]

Hi AdSvS,

on the semediawiki-user mailinglist Neill Mitchell kindly provided hints to a solution to this:

You can achieve this in a non automatic way using SF 1.9's show on 
select functionality. You can see an example here:

You could have it that when you select United States from a country 
field, you get set subsequent field that lists the companies for the US.

It takes the values from properties though, so you would have to 
manually populate the lists. You would also need to create one 
<div></div> block per country.

See http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Form_markup_language for a detailled description.

Hope this helps, Achimbode 12:13, 26 July 2010 (UTC)

Concepts not working[edit]

I have no idea what I am doing wrong, but I can not get my concept to work. I just want to dispay all of the pages that have one property

{{#concept: [[Has Name::+]] }}

I have this on a page in the concept namespace, I have created a concept cache, but still nothing. This is driving me insane...please someone help me!

MediaWiki 1.16.0
SMW 1.5.5

Thanks --Dgennaro 01:40, 1 February 2011 (CET)

I presume that you additionally need to specify a category containing the pages to search the property in. However posting to the SMW user mailing list is the fastest way to get support. Cheers --[[kgh]] 19:40, 2 February 2011 (CET)
Yeah, I figured this out late last night and did not have a chance to update. For a concept to work it requires a Category be included.
Thanks for the swift response. --Dgennaro 19:49, 2 February 2011 (CET)

I also have problems with concepts after upgrading SMW from 1.5.0 to 1.7.0 - all concepts from my wiki were defined in the following way (all pages from a namespace):

{{#concept: [[SomeNamespace:+]]|some documentation}}

This had worked before the upgrade but now it doesn't anymore. Is it really the case that I'd have to create categories in addition to the namespaces? That would be most inconvenient. OUA 12:31, 13 January 2012 (CET)

Hi OUA, concepts are unfortunately broken in SMW 1.7.0 and a bug was filed. I am keeping my fingers crossed that it will be back working soon. Cheers --[[kgh]] 14:32, 13 January 2012 (CET)
Hi kgh, I found that concepts are still working in SemanticForms, that is, values from concept does list all my concepts correctly. I've noticed a difference in how the list is obtained though. In SMW_ConceptPage.php the responsible code is
$store = smwfGetStore();
$description = new SMWConceptDescription( $this->getDataItem() );
$query = SMWPageLister::getQuery( $description, $this->limit, $this->from, $this->until );
$queryResult = $store->getQueryResult( $query );
which seems to be broken, whereas in SemanticForms we have in SF_Utils.php
$store = smwfGetStore();
$desc = new SMWConceptDescription( $concept );
$query = new SMWQuery( $desc );
$query_result = $store->getQueryResult( $query );
So it seems to me that the bug is to be found with SMWPageLister::getQuery(). Does anybody have an idea where to look from there. I'm getting lost when in comes to the code concerning database access and queries. OUA 12:02, 16 January 2012 (CET)
Concept caching was fixed just yesterday. You may want to download and install SMW and see if it is working for you. If not this looks may be worth a bug report or at least a mail to the developer mailing list. Such detail is out of scope since it is to esoteric for 99+% of the users. Cheers --[[kgh]] 21:54, 16 January 2012 (CET)

Example in lead is clipped off by TOC[edit]

The <pre> code in the lead extends behind the TOC box. I can't edit or I'd fix it. Sreed 20:08, 24 August 2011 (CEST)

Hi Sreed, is it better now? Cheers --[[kgh]] 20:29, 24 August 2011 (CEST)

Help:Concept caching[edit]

Would be nice to see something like See also that shows links relevant to concepts such as Concept caching without searching the whole database.--MWJames 19:33, 31 October 2011 (CET)

Good idea. I just added a note to the documentation. Thank you and cheers --[[kgh]] 20:31, 31 October 2011 (CET)

the date comparison doesn't work in concepts[edit]

i am using MW1.18.1, SMW1.7.1. I tested the example code

{{#concept: [[Category:Event]] [[start date::> Jan 1 2008]] [[start date::< Dec 31 2008]] 
| Events in the year 2008 that have been announced on semanticweb.org. 
  To add more events, go to the page "Events" on semanticweb.org.

but i get all pages of Category:Event, when i tested the params in a inline query, the result is right. of course ,the property:start date has the type of date.

Hi Extirpate, that's definitively a bug then and one should be filed at bugzilla. Is your wiki public? It is always good to have a link to refer to. In case it is not it would be cool if you could reproduce it at http://scratchpad.referata.com and drop a short note about it here. I would do the bug report for you afterwards. Cheers --[[kgh]] 22:30, 13 April 2012 (CEST)

What links here[edit]

It would be very handy to have pages listed that use a concept in their query, similar to template transclusions.
It's very hard to keep track of which pages make use of a concept, in case you need to change query conditions of a query, and want to know which pages will be affected by the change.
--TriMoon 11:16, 19 July 2012 (CEST)

Hello TriMoon, ideed this would be very handy. As a matter of fact Task T35181 was filed to address this. Hopefully this one will be dealt with sooner than later. Cheers --[[kgh]] 12:48, 19 July 2012 (CEST)


Thread titleRepliesLast modified
Inverse referencing for user pages in Concepts218:29, 3 February 2016
Identifying what Concept a page belongs to023:08, 10 May 2013
Inverse referencing in concepts118:27, 5 September 2012

Inverse referencing for user pages in Concepts

I'm trying to generate a list of contributors to a particular effort that I can leverage for a type-ahead field of a form. I thought the best route to go would be to create a Concept. I'm runming SMW 2.1 and have Extra Special Properties 1.3.1, so I am trying a Concept page that looks something like this:

[[-Page creator.FOO PROPERTY::+]]
| Effort contributors.

With "FOO Property" being a property present on all the pages within my effort. I have gotten this inverse property method to work on Concepts that do not reference user pages, but for some reason, when I save the concept the query shown on the Concept page reverts to:

[[Page creator.FOO PROPERTY::+]]
| Effort contributors.

without the inverse - and I receive no results. This same inverse query works fine on the Special:Ask page, so I am curious if this is a limitation of Concepts?

21:44, 27 January 2016

> I'm runming SMW 2.1 and have Extra Special Properties 1.3.1, so I am trying a Concept page that looks something like this:

SMW 2.1 is no longer maintained.

> without the inverse - and I receive no results. This same inverse query works fine on the Special:Ask page, so I am curious if this is a limitation of Concepts?

[0, 1] describes some test cases and a fix with [2] containing a corresponding example.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1096

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0204.json

[2] http://sandbox.semantic-mediawiki.org/wiki/Concept:InversePageCreatorLastEditorIs

23:40, 27 January 2016

Thank you so much. Great information and example!

18:29, 3 February 2016

Identifying what Concept a page belongs to

Is there currently any way to identify from viewing a page/article what Concept it belongs to? I have a series of Concepts established and trying to load widget data to an article based on what Concept it is listed in, but I cannot determine a way to extract that data. I am currently running SMW 1.7 but looking to upgrade to 1.8. Would the Has Query functionality help me?

23:08, 10 May 2013

Inverse referencing in concepts

Hi folks,

inverse referencing in concepts is not available at the moment. Right? Is it planned to get this feature also for concepts?

Cheers, -Rolze (talk) 15:30, 5 September 2012 (CEST)

15:30, 5 September 2012

Hi Rolze, you should send this to the developer mailing list. They will not see this post here. Cheers

18:27, 5 September 2012