I thought I had seen this issue come up before, but I can't find it documented anywhere. I am using Semantic MediaWiki 0.7. Please read the scenario below, I will then tell you my expected and actual results. I've tried to strip out pieces that aren't illustrative of the issue. You'll notice some references to Semantic Forms, but that's not really material to the scenario below.

I have created a template that looks like this:

= Template:Native range =

* {{ #ifexist: {{{native_range}}} | [[native range::{{{native_range}}}]] ([[Special:EditData/Geographical range/{{{native_range}}}|edit with form]]) | {{{native_range}}} ([[Special:AddData/Geographical range/{{{native_range}}}|add with form]])}}<br />

The above template displays a relationship (with an edit button) if the native range exists, otherwise it simply displays the text of the native range with a link to to create that native range. This may be important, since the relation isn't displayed if the page does not exist yet.

I then create the following page:

= Bicolor Parrotfish =

{{Native range

There's a lot more to the page, but the above part is all that's important here. Now, there exists the following template:

= Template:Geographical range =

Species in native range {{PAGENAME}}:

<ask format="ul">
  [[Native range::{{PAGENAME}}]]

[[Category:Geographical range]]

After creating Bicolor Parrotfish, I then create the following page (the template looks silly at the moment, but it's there because of Semantic Forms and the fact that I may add data in the future):

= Indo Pacific =

{{Geographical range}}

The problem is, if I create Indo Pacific after creating Bicolor Parrotfish, then the semantic query on Indo Pacific (in the template) does not pick up Bicolor Parrotfish unless I go back and edit Bicolor Parrotfish (no changes necessary) and save. If I create Indo Pacific first I get the expected results of the query. I've tried the /w/index.php?title=foo&action=purge trick on both pages with no success. The only way to fix it is to make a dummy edit to Bicolor Parrotfish. Has anyone else run into this problem or have a solution?

Bradley Holt