Extension talk:Semantic Internal Objects

Duplication of Objects

 * MediaWiki 	1.15.1
 * SIO: 0.6.3

I created a simple template:

This template is called on a page named "History" just as example:

Fine.

As the template does not make any output I ask for these entries:

With the first load of the page anything is fine. If I reload .. all the entries double. If I reload again .. i get one more entry. Anyway: If I switch to edit-modus I still see only one object-definition .. if I save then I have one entry and the game restarts.

This error does not occur always. I make some edits .. and it is gone. I make some new edits und is is back again.

Do you have any idea?

Update: I want to cry. I cleaned the whole History-Page and startet with minimalistic entries to see, at which point the duplication occurs. It does not. I restored my old content .. and there is no error anymore -.-

Update 2: One Entry more and I have the duplication again

Update 3: Just to clarify: The amount of SIO does not change if I simply ask for them. It only changes, if I load the page, where these sio are defined.

--109.164.246.152 15:54, 17 January 2011 (UTC)


 * That's not good - it means the old duplication problem is still there. I was never convinced that it went away entirely - but the number of ways in which it can occur has definitely decreased. Anyway, don't cry! I bet a solution can be found. Could you try to replicate this problem on a public wiki, like scratchpad.referata.com? Yaron Koren 19:16, 17 January 2011 (UTC)


 * Thanks for the sandbox. http://scratchpad.referata.com/wiki/History. Anyway: At the moment I cannot reproduce the error, neither there nor on my own wiki. One little thing at referata: Sometimes the content of the first entry is missing.


 * Update: Missing content: Does occur, if I have a link link in the content and no definition for the attribute as has type::Text

--109.164.246.152 13:09, 18 January 2011 (UTC)


 * Okay, that makes sense - properties of type "Page" (which is what properties are by default, if you don't specify anything else) can't include links. It's not a bug. Yaron Koren 13:58, 19 January 2011 (UTC)


 * Duplicate-Error: I am still not able to reproduce the error at will, anyway, I see some conditions:
 * - the duplication occurs only, if definition and askquery are on the same page
 * - after duplication come into effect, it is displayed with every ask-query anywhere.
 * - IF the error occurs, it seems to occurs everywhere: I got it again .. now i see duplicates also on pages/sio which did not change during the last days.
 * - Update: Maybe there is a dependency with the Job_queue. I have many queued jobs at the moment due to changes in central templates. From time to time the duplication is gone, although no edit on the page has been made. With every reload from now on, it reappears. I'll wait until my job_queue is empty and retry afterwards.
 * -Update 2: Alright .. there IS a clear dependency with job_queue: I could reproduce the error on different pages with differend SIO as long as the job_queue had entries. As soon as the queue is cleared, the error does not occur anymore.
 * --193.247.250.55 09:04, 24 January 2011 (UTC)

Update 4: I have been using the semantic internal object in my mediawiki for holding news items. Each news item consists of news article,news date and project field(project filed holds the project which this news is related to). I would like to give my observation about duplication of field in internal object.
 * - Duplication Error: This error happens time to time which is shown in my #ask result. I have been trying to find how we get to this state so I can reproduce this bug. The only field that get duplicated is news article field.
 * - As mention above, this bug seems to be a state that the system enters for a period of time and then the system automatically comes out of it and behave normally.
 * - I had the "#ask" query in the same page as my news items but even after removing the ask query from that page I still got into duplication state.
 * - As mention on update 3, when the system enters this state you will see this anywhere that has any ask query.
 * - The only way that I can reproduce this is when there is jobs queued and I make changes to any of my news items(Removing, Adding or modifying news item on any page).
 * - Even if I have jobs queued and I do any changes which does not effect my internal object, This problem will not occurs.

I am also getting duplicated content of SIO field data when displaying multiple objects in a table. I uploaded an example to the scratchpad here. I also can't reproduce the problem on the scratchpad, but I believe it has to do with MediaWiki page cache settings as noted on the scratchpad page. I've verified that I don't see the problem on my wiki with caching turned on, but I must have it turned off. --Dmulter 23:57, 23 February 2011 (UTC)

Type to use
Hello,

What type are we supposed to put in the property page describing a semantic object ?


 * The main property should be of type "Page", if that's what you're asking about. Yaron Koren 15:31, 7 February 2011 (UTC)

Combining page properties and semantic properties
Hello, is possible to combine page properties and semantic object properties in a query ?

For example, let's say we have recipes separated by continents. The recipe page would have a from_continent::europe property, and then it would have the SIO.

If at some opint you want to make a list of all recipe from europe using flour, it would seem normal to do

but it doesn't seem to work.

I also tried a category approach

but no success either.

Is there a special syntax in the query declaration to refer to the SIO's parent's properties ?

--61.114.185.196 08:47, 23 February 2011 (UTC)


 * Yes - your query should look like " Is part of recipe.From continent::EuropeHas ingredient::flour ". Yaron Koren 13:27, 23 February 2011 (UTC)

Combining regular semantic queries with SIO?
Dear Yaron Koren, my question is probably best asked using an example:

Template/form
Say you have a Form:Speed skaters for listing contestants on articles about ice skating races. Some properties are specific to each race, such as "Year of race" and "Sponsor". Other properties are specific to each contestant and so are handled by multiple instances of a SIO call to #set internal, for instance:

In Template:Speed skaters the SIO call for the champion would look something like this:

Likewise, for the contestant who came second:

Etcetera

The query
Now say one wants to build a query, sorted by year, which gives an overview of all races and their contestants, with a column for first-place champions, another for second place, a third for bronze, etc. The first set of columns (i.e. which comes before the names of the contestants) consists of a column for the names of the races, another for the year in which the race had been organised and another for the sponsor. To help you visualise what I mean here, consider the following (again completely fictitious) example:

Etcetera

Or if you want to include the "average speed" of each contestant:

Etcetera

The circumstances are obviously entirely imaginary, but the kind of situation portrayed here looks fairly common to me. In fact, I've run into a very similar one. So my question would be: what query should be used, if possible at all, to produce a table like the one sketched above? Regards, Cavila 12:31, 25 February 2011 (UTC)


 * I see the issue - you want to display the year and sponsor in the same query as the other stuff. Unfortunately, SMW queries don't allow the display of "linked properties". But I believe there's a workaround - you can have each internal object store the necessary values. So you could add to #set_internal something like:


 * Race has sponsor=
 * Race has year=
 * Yaron Koren 15:42, 25 February 2011 (UTC)
 * A belated thanks (I don't know how I missed this, sorry)! Although it's not entirely what I meant, it's a useful workaround that I will need to bear in mind for related situations. A complementary approach I guess would be to define separate properties for first place, second place, etc. That way at least each position (1, 2, etc.) would get a separate column. Cavila 10:07, 18 April 2011 (UTC)

Selecting SIOs of a specific page
Hi there. I got al little problem with the design of a query.

I have a wiki that is used to document our company's interfaces. We have a ticket tracker and so on, but we want to store some important tickets/change requests in the wiki as well. So on these article pages I have one or more set_internal like I use the category property in querys to only show a assignment of a specific type.

But what I'm missing is an easy way to select SIOs only from a specific page or category.

I think I could store the Category and the Page in the SIO as well, but maybe there is an easier way.


 * Hi - if that #set_internal call is meant to go on a page named "27526", then it is indeed unnecessary - you can just do a query like " {{#ask:is assigned to::27526|... ". A property named "category" is also confusing, since that doesn't correspond to a MediaWiki category, but that's another story. Yaron Koren


 * In our system, an article could have assignments other articles of different, specific categories. E.g. a ticket could be assigned to an Interface and/or an Change Request. Maybe here again I could use different properties for that, but I wanted to keep it as simple as possible.

Need to resave the pages to get SIO appearing
Hello, I saw that there was this problem before with this extension and saw in the version log that it was fixed, but I am still encountering this issue.

My setup:


 * Mediawiki 1.16.1
 * Semantic Internal Objects (Version 0.6.3)
 * Semantic MediaWiki (Version 1.5.6 alpha)

I declare SIO on pages from the Category A all formatted with the same template, and have a Query on the same page fetching the data and putting it in a nicer display, but I noticed that I need to save a page twice to get the SIO actually be taken in account. If it was only about the page you just saved it would not be a huge issue, just a bother, but my main worry is when it comes to templates. A small modification in the template will force a refreshlink job on all the pages using it (around 900, processed with runJobs.php), but after the refreshlink job the SIO disappear, and I have then to go on each page again and resave it. Purge doesn't have any impact and there isn't any job left in the queue. Obviously, it's not really convenient to manually resave every page if someone changes a letter in the main template.

Do you have any idea ? --61.114.185.196 06:43, 19 April 2011 (UTC)


 * Hi - this may be two different, unrelated problems - though I'm surprised that either one is happening. If possible, could you try to replicate at least one of the issues on a public wiki, like http://scratchpad.referata.com? That would make it easier to debug. Yaron Koren 13:48, 19 April 2011 (UTC)