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 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)