Hi James,

On Sun, Jan 19, 2014 at 11:57 PM, James HK <jamesin.hongkong.1@gmail.com> wrote:
Hi,

> code still responds to the LinksUpdate::doUpdate() call, but it doesn't
> seem to do the right thing

If what you are saying is correct (that some information are missing
or not doing the right thing) then no data would be stored in SMW at
all ([1] is the main entry point for the Store update when receiving
data from the ParserOutput object). It would also mean that our unit
tests (when running on Mock) or integrations tests (when running
against an actual DB) are inappropriate which seems rather odd because
the data that are expected to be present and checked against are
present in the Store after all.

Okay... nevertheless, there are now two people who have independently observed that it's not working correctly with Approved Revs.

I think the best way to prove above argument is by presenting a unit
or an integration test that highlights the issue and is used as litmus
test for a possible fix.

I'll definitely try to do this, though I hope this is not now a requirement for every SMW-related bug report.

-Yaron

With regards to LinksUpdate, as for SMW 1.8/SMW 1.9 the hook
LinksUpdateConstructed [1, 2] is implemented and executed to initiate
a Store update.

[1] http://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdateConstructed

[2] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/hooks/LinksUpdateConstructed.php

Cheers

On 1/20/14, Yaron Koren <yaron@wikiworks.com> wrote:
> Hi,
>
> The Approved Revs extension no longer seems to work with Semantic MediaWiki
> 1.9 - someone pointed that out on the mailing list a few months ago, and I
> finally tested it out and confirmed the problem. Basically, when an
> administrator, using AR, approves some revision of a page, the AR code
> calls LinksUpdate::doUpdate() on that old revision of the page. This
> updates the category information for that page, and it is also is meant to
> be used by SMW and other extensions to update their own information for the
> page. You can see the relevant code in lines 230-236, here:
>
> http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FApprovedRevs/3ff2bdc1f9b26a2d886f0d2e69b547b69c7d3748/ApprovedRevs_body.php
>
> This worked fine for SMW versions before 1.9; and in version 1.9 the SMW
> code still responds to the LinksUpdate::doUpdate() call, but it doesn't
> seem to do the right thing - it deletes the existing semantic information
> for the page, which is good, but it then doesn't store any new semantic
> information.
>
> I looked through the SMW code, and I can see the chain of functions called,
> but I can't really understand what it's doing, or where the problem lies.
> My guess is that SMW now requires something else to be called besides just
> LinksUpdate::doUpdate(), either before or afterwards - something that's
> called during a normal page save, but isn't being called by Approved Revs.
> That's just a guess, though.
>
> Hopefully there's an easy fix, whether it involves changing the SMW or AR
> code (or both).
>
> Can anyone help? I'm happy to answer any questions related to this.
>
> Thanks,
> Yaron
>
> --
> WikiWorks MediaWiki Consulting http://wikiworks.com
>



--
WikiWorks MediaWiki Consulting http://wikiworks.com