Extension talk:SemanticDependencyUpdater

Jump to navigation Jump to search

About this board

Tinss (talkcontribs)

Hello @Planetenxin, thanks for this extension. Does it work through templates?

On my wiki, most semantic properties are defined through templates and it seems I still need to do a manuel blank edit for everything to update event though a page defines Semantic_Dependency (through a template...)

Planetenxin (talkcontribs)
  • Make sure, a page Property:Semantic_Dependency exists with content [[Has type::Text]]
  • Make sure, $wgSDUUseJobQueue = false;
  • Create a page A with
  • Create a page B with
* [[Part Of::A| ]][[Title::{{#show:A|?Title}}.B]]
* {{#show:{{FULLPAGENAME}}|?Title}}
  • Now, change page A as follows

As a result, on pageB you should see

Planetenxin (talkcontribs)

If the above procedure works, it should also work in templates

Reply to "Works through templates?"

Throwing an error on MW 1.30

Revansx (talkcontribs)

Hi, I'm trying to get this running on my MW 1.30/SMW 2.5.6 Site and after performing the following steps:

  1. created the "Property:Semantic_Dependency" property as [[Has type::Text]]
  2. and then unzipping the extension archive to my extension folder
  3. adding "wfLoadExtension( 'SemanticDependencyUpdater' );" to "LocalSettings.php"

My 1.30 wiki threw the following exception:

Fatal error: Uncaught exception 'Exception' with message 'SemanticDependencyUpdater requires SemanticMediaWiki to be installed.' in /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php:261 Stack trace: 
#0 /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php(148): ExtensionRegistry->readFromQueue(Array) 
#1 /opt/htdocs/mediawiki/includes/Setup.php(40): ExtensionRegistry->loadFromQueue() 
#2 /opt/htdocs/mediawiki/includes/WebStart.php(114): require_once('/opt/htdocs/med...') 
#3 /opt/htdocs/mediawiki/index.php(40): require('/opt/htdocs/med...') 
#4 {main} thrown in /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php on line 261

it's weird because SMW *is* installed (2.5.6) and it does work great.

Any ideas on why this error is occuring?

Revansx (talkcontribs)

could this be a permissions problem with my /includes folder?

Planetenxin (talkcontribs)

did you check, if SDU is registered in LocalSettings after SMW?

Revansx (talkcontribs)

I'll do that today and let you know. More soon.

Reply to "Throwing an error on MW 1.30"

How is this extension different from "Semantic Dependency"?

Revansx (talkcontribs)
Cindy.cicalese (talkcontribs)

Good question. I wrote Semantic Dependency several years ago when I had a specific need for it, but I'm not sure if it is still actively being used at this point. Perhaps, if Semantic Dependency Updated meets the same need and is in active use, Semantic Dependency should be archived.

Revansx (talkcontribs)

Sounds like you're saying that new efforts should use SemanticDependencyUpdater over SemanticDependency. yes?

Cindy.cicalese (talkcontribs)

If indeed they meet the same need. The names are similar, and a quick read of the extension page for SemanticDependencyUpdater seems similar, but I'd be interested to hear @Planetenxin's opinion on whether they serve the same purpose.

Revansx (talkcontribs)

right. sometimes the subtle differences make all the difference and it's nice to know what the pros are using.

Planetenxin (talkcontribs)
Cindy.cicalese (talkcontribs)
Revansx (talkcontribs)

sometimes simplicity is better, sometimes fancy features are best.. it would be nice to see a side-by-side comparison of features for these two apparently similar extensions.

Revansx (talkcontribs)

it seems to me the basic task of performing a null edit on pages with semantic dependencies *should* be a core part of SMW. does anyone know if this is on anyone's radar in the SMW team?

Cindy.cicalese (talkcontribs)

As far as I can tell, there are three major differences between the extensions.

1) SemanticDependency defines a page type property per namespace that, if it exists on a page in that namespace, points to other pages that depend upon the current page. SemanticDependencyUpdater defines a single text property that, if it exists on a page, holds a query that when executed will result in pages that depend upon the current page.

2) SemanticDependency uses SMWUpdateJob to update only the SMW data on the page. SemanticDependencyUpdater issues a null edit on the page.

3) SementicDependency has a threshold configuration variable. Refresh jobs will be executed immediately up to that threshold; additional jobs will be put on the job queue. SemanticDependencyUpdater has a configuration variable that indicates whether all jobs should be executed immediately or all jobs should be put on the job queue.

Other than that, SemanticDependency could use some love since it has not been updated to use extension registration. Also, IIRC there was a bug that showed up when running the refreshLinks maintenance script in some cases.

I don't know of any work to include this functionality in SMW. I did get some much appreciated advice from mwjames when implementing SemanticDependency, but I do not believe it was on his radar at that time to include this functionality directly in SMW. This is one of those features that needs to be used with care, as it can cause performance bottlenecks. SemanticDependency forbids having a page depend upon a page that depends upon another page to try to mitigate circular dependencies, but it can still cause quite a bit of update activity if the dependencies are not well designed.

Reply to "How is this extension different from "Semantic Dependency"?"
There are no older topics