Oli Reading
Oli Reading

Reputation: 21

Semantic MediaWiki not honouring transcluded properties

Not sure if this is a MediaWiki issue or a Semantic issue...

I have a bunch of pages that are all just instances of a template with properties:

{{mytemplate|prop1}}

...where the template defines a Semantic MediaWiki property:

[[MyProperty::{{{1}}}|]]

Subsequent #ask queries find the properties after I'd entered all those.

Problem is, after making various adjustments, eg changing property names, it all stopped working smoothly - the #ask query would only show a subset of the right set of results, and perhaps the next day it would show a few more, as though there was an extremely lazy update going on.

I've found that if I edit the page to add the property explicitly, it instantly works fine. But an edit to the template included into it doesn't cause the properties declared in the template to work. I've run rebuildData.php and runJobs.php maintenance scripts with various 'force update' options, but nothing brings all the data back.

My theory is that it's a transclusion issue - the scan for properties isn't including the template into the page before checking it for properties (non-transcluded properties instantly work) so wondering if there's a transclusion cache that I can clear before rebuilding the semantic database to get it to honour the full current configuration.

Any advice on how I can get the semantic mediawiki property scan to honour transcluded properties?

Upvotes: 0

Views: 42

Answers (1)

Oli Reading
Oli Reading

Reputation: 21

I think I discovered the problem...

I made an edit at some point to include the property declarations in <!-- html comment markers --> which initially didn't seem to cause an issue (hoping that the semantic parser wouldn't ignore html comments) - but I now think it was working after that only because of cached properties, and when I removed the comment markers, all the properties suddenly appeared!

Upvotes: 0

Related Questions