Job queue is always clear. Semantic Properties for AR via SESP only update *after* an
edit. Simply approving a revision does not update the SESP AR properties in SMW.
I’m actually looking to copy what has been done in “SemanticDependencyUpdater” at:
https://github.com/gesinn-it/SemanticDependencyUpdater/blob/master/includes…
The necessary code seems to be:
$page = WikiPage::newFromID( $this->title->getArticleId() );
if ( $page ) {
$content = $page->getContent( Revision::RAW );
$text = ContentHandler::getContentText( $content );
$page->doEditContent( ContentHandler::makeContent( $text, $page->getTitle() ),
"[SemanticDependencyUpdater] Null edit." );
$page->doPurge(); // required since SMW 2.5.1
}
/Rich
From: John [mailto:phoenixoverride@gmail.com]
Sent: Wednesday, June 19, 2019 8:53 PM
To: Evans, Richard K. (GRC-H000) <richard.k.evans(a)nasa.gov>
Cc: MediaWiki announcements and site admin list <mediawiki-l(a)lists.wikimedia.org>
Subject: Re: [EXTERNAL] Re: [MediaWiki-l] using the "PageUpdater::saveRevision"
method
Two suggestions, 1) check your job queue 2) look at the API’s purge module, it has a
method to force link updates too.
On Wed, Jun 19, 2019 at 8:49 PM Evans, Richard K. (GRC-H000)
<richard.k.evans@nasa.gov<mailto:richard.k.evans@nasa.gov>> wrote:
Hi John,
I'm troubleshooting a problem in the combined use of SMW, SESP, and ApprovedRevs.
The desired behavior is to have the "approval status" of the page available to
the wiki as a semantic property of the page via SESP. Everything works well except that
the SESP AR values don't update until the page is edited.
It's not clear to me which of the 3 extension (SMW, AR, SESP) is not addressing this
scenario properly, but as a quick fix, I can imagine AR being updated to perform a
null-edit in the background after each time the page is either 'approved' or
'unapproved'. Is this a reasonable way to fix the situation? Yaron said this
approach to solving the problem could work. Now I’m seeking guidance on how to do it.
/Rich
From: John [mailto:phoenixoverride@gmail.com<mailto:phoenixoverride@gmail.com>]
Sent: Wednesday, June 19, 2019 5:05 PM
To: Evans, Richard K. (GRC-H000)
<richard.k.evans@nasa.gov<mailto:richard.k.evans@nasa.gov>>; MediaWiki
announcements and site admin list
<mediawiki-l@lists.wikimedia.org<mailto:mediawiki-l@lists.wikimedia.org>>
Subject: [EXTERNAL] Re: [MediaWiki-l] using the "PageUpdater::saveRevision"
method
What are you trying to achieve with your null edit?
On Wed, Jun 19, 2019 at 5:02 PM Evans, Richard K. (GRC-H000) via MediaWiki-l
<mediawiki-l@lists.wikimedia.org<mailto:mediawiki-l@lists.wikimedia.org>>
wrote:
I'm trying to update an extension so that it performs a "null-edit" on the
page it is already operating on.
I've discovered the "PageUpdater::saveRevision" documentation and am hoping
someone can help me with an example of how this method could be called within the typical
framework of an extension? .. assuming the extension has a specific page defined as
"$article" how would I write a line of code in the extension that performs a
"null-edit" of "$article" using the
"PageUpdater::saveRevision" method?
- Rich
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l<https://urldefe…