ApprovedRevs + SMW

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ApprovedRevs + SMW

Alexey Klimovich
Hi, Guys!

I did not touch ApprovedRevs for long time, so, maybe, I forgot some
details, but recently i was surprised a bit:

I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;

Once i create or edit page (as normal user, without auto-approve rights)
with some semantic property inside and go to Special:Browse - i see all
my changes there in factbox. It seems like ApprovedRevs did not affect
SMW anyhow - all changes get passed to SMW, so my edit reflects in all
ask-queries.

This seems very strange for me, can someone confirm - is it a bug or
intended behavior?


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Yaron Koren-2
That's certainly not intended behavior. Is the page displaying correctly, i.e. blank? And can you find by searching on its contents from Special:Search? (Hopefully not.)

Also, I'd recommend upgrading to the latest Approved Revs version, 0.7.1 - who knows, that might be a bug that got fixed.

On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka <[hidden email]> wrote:
Hi, Guys!

I did not touch ApprovedRevs for long time, so, maybe, I forgot some
details, but recently i was surprised a bit:

I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;

Once i create or edit page (as normal user, without auto-approve rights)
with some semantic property inside and go to Special:Browse - i see all
my changes there in factbox. It seems like ApprovedRevs did not affect
SMW anyhow - all changes get passed to SMW, so my edit reflects in all
ask-queries.

This seems very strange for me, can someone confirm - is it a bug or
intended behavior?


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



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

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Alexey Klimovich
Hey Yaron, thanks for a lightning speed response :)

Yep, page is displaying correctly (blank), but i am able to find it by
searching its contents via search (huh?).

I made some quick debug and figured out that

ApprovedRevsHooks::updateLinksAfterEdit

properly sends empty $text to LinksUpdate, however in

ApprovedRevsHooks::setSearchText

it retrieves actual article text by hitting

$revisionID != $article->getLatest()

condition. I guess it is happening because above $revisionID returned by
ApprovedRevs::getApprovedRevID( $title ) is false instead of null. I am
investigating it further .. :)

29.04.2016 23:53, Yaron Koren пишет:

> That's certainly not intended behavior. Is the page displaying
> correctly, i.e. blank? And can you find by searching on its contents
> from Special:Search? (Hopefully not.)
>
> Also, I'd recommend upgrading to the latest Approved Revs version, 0.7.1
> - who knows, that might be a bug that got fixed.
>
> On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi, Guys!
>
>     I did not touch ApprovedRevs for long time, so, maybe, I forgot some
>     details, but recently i was surprised a bit:
>
>     I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
>     ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;
>
>     Once i create or edit page (as normal user, without auto-approve rights)
>     with some semantic property inside and go to Special:Browse - i see all
>     my changes there in factbox. It seems like ApprovedRevs did not affect
>     SMW anyhow - all changes get passed to SMW, so my edit reflects in all
>     ask-queries.
>
>     This seems very strange for me, can someone confirm - is it a bug or
>     intended behavior?
>
>
>     ------------------------------------------------------------------------------
>     Find and fix application performance issues faster with Applications
>     Manager
>     Applications Manager provides deep performance insights into
>     multiple tiers of
>     your business applications. It resolves application problems quickly and
>     reduces your MTTR. Get your free trial!
>     https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>     _______________________________________________
>     Semediawiki-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>
>
>
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Alexey Klimovich
Ok, so, here are my results:

I am not sure why this is happening, but it is definitely happening:

1. In ApprovedRevsHooks::setSearchText there is
ApprovedRevs::getApprovedRevID called
2. in ApprovedRevs::getApprovedRevID $dbr->selectField( .. ) called (
only first time, then cached in self::$mApprovedRevIDForPage )
3. since we talking about page that have no approved revision yet, there
is no record for this pageID in approved_revs table and we receive false
as result from $dbr-selectField ( see. Database.php, line 1396 ) because
there are no rows returned in result
4. in ApprovedRevsHooks::setSearchText we did not pass null-check
because returned $revisionID is false instead of null.
5. Actual article content saved as search text

Same is actual for latest ApprovedRevs. I've checked additionally
changes in Database.php in git, it always was "false" there. I am
confused o_O

30.04.2016 0:21, Vedmaka пишет:

> Hey Yaron, thanks for a lightning speed response :)
>
> Yep, page is displaying correctly (blank), but i am able to find it by
> searching its contents via search (huh?).
>
> I made some quick debug and figured out that
>
> ApprovedRevsHooks::updateLinksAfterEdit
>
> properly sends empty $text to LinksUpdate, however in
>
> ApprovedRevsHooks::setSearchText
>
> it retrieves actual article text by hitting
>
> $revisionID != $article->getLatest()
>
> condition. I guess it is happening because above $revisionID returned by
> ApprovedRevs::getApprovedRevID( $title ) is false instead of null. I am
> investigating it further .. :)
>
> 29.04.2016 23:53, Yaron Koren пишет:
>> That's certainly not intended behavior. Is the page displaying
>> correctly, i.e. blank? And can you find by searching on its contents
>> from Special:Search? (Hopefully not.)
>>
>> Also, I'd recommend upgrading to the latest Approved Revs version, 0.7.1
>> - who knows, that might be a bug that got fixed.
>>
>> On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Hi, Guys!
>>
>>     I did not touch ApprovedRevs for long time, so, maybe, I forgot some
>>     details, but recently i was surprised a bit:
>>
>>     I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
>>     ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;
>>
>>     Once i create or edit page (as normal user, without auto-approve rights)
>>     with some semantic property inside and go to Special:Browse - i see all
>>     my changes there in factbox. It seems like ApprovedRevs did not affect
>>     SMW anyhow - all changes get passed to SMW, so my edit reflects in all
>>     ask-queries.
>>
>>     This seems very strange for me, can someone confirm - is it a bug or
>>     intended behavior?
>>
>>
>>     ------------------------------------------------------------------------------
>>     Find and fix application performance issues faster with Applications
>>     Manager
>>     Applications Manager provides deep performance insights into
>>     multiple tiers of
>>     your business applications. It resolves application problems quickly and
>>     reduces your MTTR. Get your free trial!
>>     https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>     _______________________________________________
>>     Semediawiki-devel mailing list
>>     [hidden email]
>>     <mailto:[hidden email]>
>>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>>
>>
>>
>> --
>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>
>>
>>
>> _______________________________________________
>> Semediawiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Alexey Klimovich
After some more spent on investigation i must conclude that, generally,
there is no reason semantic properties in not-approved pages for not to
appear. They should appear, because no one stops them.

I guess things broken in REL1_21 branch of ApprovedRevs when

$wgHooks['ParserBeforeInternalParse'][] =
'ApprovedRevsHooks::setApprovedRevForParsing';

was replaced by

$wgHooks['ArticleEditUpdates'][] =
'ApprovedRevsHooks::updateLinksAfterEdit';


because SMW use 'InternalParseBeforeLinks' hook to parse things our of
text, which is called few lines after 'ParserBeforeInternalParse'. In
REL1_19 of ApprovedRevs hook was set to 'ParserBeforeInternalParse',
this allowed to pass empty content to SMW. Current set with
ArticleEditUpdates is not capable to do it.

30.04.2016 1:30, Vedmaka пишет:

> Ok, so, here are my results:
>
> I am not sure why this is happening, but it is definitely happening:
>
> 1. In ApprovedRevsHooks::setSearchText there is
> ApprovedRevs::getApprovedRevID called
> 2. in ApprovedRevs::getApprovedRevID $dbr->selectField( .. ) called (
> only first time, then cached in self::$mApprovedRevIDForPage )
> 3. since we talking about page that have no approved revision yet, there
> is no record for this pageID in approved_revs table and we receive false
> as result from $dbr-selectField ( see. Database.php, line 1396 ) because
> there are no rows returned in result
> 4. in ApprovedRevsHooks::setSearchText we did not pass null-check
> because returned $revisionID is false instead of null.
> 5. Actual article content saved as search text
>
> Same is actual for latest ApprovedRevs. I've checked additionally
> changes in Database.php in git, it always was "false" there. I am
> confused o_O
>
> 30.04.2016 0:21, Vedmaka пишет:
>> Hey Yaron, thanks for a lightning speed response :)
>>
>> Yep, page is displaying correctly (blank), but i am able to find it by
>> searching its contents via search (huh?).
>>
>> I made some quick debug and figured out that
>>
>> ApprovedRevsHooks::updateLinksAfterEdit
>>
>> properly sends empty $text to LinksUpdate, however in
>>
>> ApprovedRevsHooks::setSearchText
>>
>> it retrieves actual article text by hitting
>>
>> $revisionID != $article->getLatest()
>>
>> condition. I guess it is happening because above $revisionID returned by
>> ApprovedRevs::getApprovedRevID( $title ) is false instead of null. I am
>> investigating it further .. :)
>>
>> 29.04.2016 23:53, Yaron Koren пишет:
>>> That's certainly not intended behavior. Is the page displaying
>>> correctly, i.e. blank? And can you find by searching on its contents
>>> from Special:Search? (Hopefully not.)
>>>
>>> Also, I'd recommend upgrading to the latest Approved Revs version, 0.7.1
>>> - who knows, that might be a bug that got fixed.
>>>
>>> On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka
>>> <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>     Hi, Guys!
>>>
>>>     I did not touch ApprovedRevs for long time, so, maybe, I forgot some
>>>     details, but recently i was surprised a bit:
>>>
>>>     I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
>>>     ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;
>>>
>>>     Once i create or edit page (as normal user, without auto-approve rights)
>>>     with some semantic property inside and go to Special:Browse - i see all
>>>     my changes there in factbox. It seems like ApprovedRevs did not affect
>>>     SMW anyhow - all changes get passed to SMW, so my edit reflects in all
>>>     ask-queries.
>>>
>>>     This seems very strange for me, can someone confirm - is it a bug or
>>>     intended behavior?
>>>
>>>
>>>     ------------------------------------------------------------------------------
>>>     Find and fix application performance issues faster with Applications
>>>     Manager
>>>     Applications Manager provides deep performance insights into
>>>     multiple tiers of
>>>     your business applications. It resolves application problems quickly and
>>>     reduces your MTTR. Get your free trial!
>>>     https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>     _______________________________________________
>>>     Semediawiki-devel mailing list
>>>     [hidden email]
>>>     <mailto:[hidden email]>
>>>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>>
>>>
>>>
>>>
>>> --
>>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Find and fix application performance issues faster with Applications Manager
>>> Applications Manager provides deep performance insights into multiple tiers of
>>> your business applications. It resolves application problems quickly and
>>> reduces your MTTR. Get your free trial!
>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>
>>>
>>>
>>> _______________________________________________
>>> Semediawiki-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Semediawiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>


--

_____________________________________________________________
Mediawiki & Semantic Mediawiki support: https://mediawiki.pro






------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Yaron Koren-2
Hi Vedmaka, 

Ah, interesting. The change you're talking about is this one, from 2013:



Evidently it was done to work better with caching.

If you change to the old code, does it definitely work correctly?

-Yaron

On Tue, May 10, 2016 at 4:36 PM, Vedmaka <[hidden email]> wrote:
After some more spent on investigation i must conclude that, generally,
there is no reason semantic properties in not-approved pages for not to
appear. They should appear, because no one stops them.

I guess things broken in REL1_21 branch of ApprovedRevs when

$wgHooks['ParserBeforeInternalParse'][] =
'ApprovedRevsHooks::setApprovedRevForParsing';

was replaced by

$wgHooks['ArticleEditUpdates'][] =
'ApprovedRevsHooks::updateLinksAfterEdit';


because SMW use 'InternalParseBeforeLinks' hook to parse things our of
text, which is called few lines after 'ParserBeforeInternalParse'. In
REL1_19 of ApprovedRevs hook was set to 'ParserBeforeInternalParse',
this allowed to pass empty content to SMW. Current set with
ArticleEditUpdates is not capable to do it.

30.04.2016 1:30, Vedmaka пишет:
> Ok, so, here are my results:
>
> I am not sure why this is happening, but it is definitely happening:
>
> 1. In ApprovedRevsHooks::setSearchText there is
> ApprovedRevs::getApprovedRevID called
> 2. in ApprovedRevs::getApprovedRevID $dbr->selectField( .. ) called (
> only first time, then cached in self::$mApprovedRevIDForPage )
> 3. since we talking about page that have no approved revision yet, there
> is no record for this pageID in approved_revs table and we receive false
> as result from $dbr-selectField ( see. Database.php, line 1396 ) because
> there are no rows returned in result
> 4. in ApprovedRevsHooks::setSearchText we did not pass null-check
> because returned $revisionID is false instead of null.
> 5. Actual article content saved as search text
>
> Same is actual for latest ApprovedRevs. I've checked additionally
> changes in Database.php in git, it always was "false" there. I am
> confused o_O
>
> 30.04.2016 0:21, Vedmaka пишет:
>> Hey Yaron, thanks for a lightning speed response :)
>>
>> Yep, page is displaying correctly (blank), but i am able to find it by
>> searching its contents via search (huh?).
>>
>> I made some quick debug and figured out that
>>
>> ApprovedRevsHooks::updateLinksAfterEdit
>>
>> properly sends empty $text to LinksUpdate, however in
>>
>> ApprovedRevsHooks::setSearchText
>>
>> it retrieves actual article text by hitting
>>
>> $revisionID != $article->getLatest()
>>
>> condition. I guess it is happening because above $revisionID returned by
>> ApprovedRevs::getApprovedRevID( $title ) is false instead of null. I am
>> investigating it further .. :)
>>
>> 29.04.2016 23:53, Yaron Koren пишет:
>>> That's certainly not intended behavior. Is the page displaying
>>> correctly, i.e. blank? And can you find by searching on its contents
>>> from Special:Search? (Hopefully not.)
>>>
>>> Also, I'd recommend upgrading to the latest Approved Revs version, 0.7.1
>>> - who knows, that might be a bug that got fixed.
>>>
>>> On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka
>>> <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>     Hi, Guys!
>>>
>>>     I did not touch ApprovedRevs for long time, so, maybe, I forgot some
>>>     details, but recently i was surprised a bit:
>>>
>>>     I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25 branch)
>>>     ApprovedRevs configured with $egApprovedRevsBlankIfUnapproved = true;
>>>
>>>     Once i create or edit page (as normal user, without auto-approve rights)
>>>     with some semantic property inside and go to Special:Browse - i see all
>>>     my changes there in factbox. It seems like ApprovedRevs did not affect
>>>     SMW anyhow - all changes get passed to SMW, so my edit reflects in all
>>>     ask-queries.
>>>
>>>     This seems very strange for me, can someone confirm - is it a bug or
>>>     intended behavior?
>>>
>>>
>>>     ------------------------------------------------------------------------------
>>>     Find and fix application performance issues faster with Applications
>>>     Manager
>>>     Applications Manager provides deep performance insights into
>>>     multiple tiers of
>>>     your business applications. It resolves application problems quickly and
>>>     reduces your MTTR. Get your free trial!
>>>     https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>     _______________________________________________
>>>     Semediawiki-devel mailing list
>>>     [hidden email]
>>>     <mailto:[hidden email]>
>>>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>>
>>>
>>>
>>>
>>> --
>>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Find and fix application performance issues faster with Applications Manager
>>> Applications Manager provides deep performance insights into multiple tiers of
>>> your business applications. It resolves application problems quickly and
>>> reduces your MTTR. Get your free trial!
>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>
>>>
>>>
>>> _______________________________________________
>>> Semediawiki-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Semediawiki-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>


--

_____________________________________________________________
Mediawiki & Semantic Mediawiki support: https://mediawiki.pro






------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



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

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: ApprovedRevs + SMW

Alexey Klimovich
Yep, I've added setApprovedRevForParsing function and related hooks into
REL1_25 ApprovedRevs ( slightly modified - removed $alreadyRun check )
and it works fine.

11.05.2016 3:46, Yaron Koren пишет:

> Hi Vedmaka,
>
> Ah, interesting. The change you're talking about is this one, from 2013:
>
> https://git.wikimedia.org/commit/mediawiki%2Fextensions%2FApprovedRevs.git/01eb9f11db32c9ec365cdb5251c80ebea2da40d4
>
> ...and that change is based on this patch:
>
> https://www.mediawiki.org/wiki/Extension_talk:Approved_Revs/Archive_2010_to_2012#Wrong_page_cached_when_saves_made_.281.19.2B.29
>
> Evidently it was done to work better with caching.
>
> If you change to the old code, does it definitely work correctly?
>
> -Yaron
>
> On Tue, May 10, 2016 at 4:36 PM, Vedmaka
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     After some more spent on investigation i must conclude that, generally,
>     there is no reason semantic properties in not-approved pages for not to
>     appear. They should appear, because no one stops them.
>
>     I guess things broken in REL1_21 branch of ApprovedRevs when
>
>     $wgHooks['ParserBeforeInternalParse'][] =
>     'ApprovedRevsHooks::setApprovedRevForParsing';
>
>     was replaced by
>
>     $wgHooks['ArticleEditUpdates'][] =
>     'ApprovedRevsHooks::updateLinksAfterEdit';
>
>
>     because SMW use 'InternalParseBeforeLinks' hook to parse things our of
>     text, which is called few lines after 'ParserBeforeInternalParse'. In
>     REL1_19 of ApprovedRevs hook was set to 'ParserBeforeInternalParse',
>     this allowed to pass empty content to SMW. Current set with
>     ArticleEditUpdates is not capable to do it.
>
>     30.04.2016 1:30, Vedmaka пишет:
>     > Ok, so, here are my results:
>     >
>     > I am not sure why this is happening, but it is definitely happening:
>     >
>     > 1. In ApprovedRevsHooks::setSearchText there is
>     > ApprovedRevs::getApprovedRevID called
>     > 2. in ApprovedRevs::getApprovedRevID $dbr->selectField( .. ) called (
>     > only first time, then cached in self::$mApprovedRevIDForPage )
>     > 3. since we talking about page that have no approved revision yet,
>     there
>     > is no record for this pageID in approved_revs table and we receive
>     false
>     > as result from $dbr-selectField ( see. Database.php, line 1396 )
>     because
>     > there are no rows returned in result
>     > 4. in ApprovedRevsHooks::setSearchText we did not pass null-check
>     > because returned $revisionID is false instead of null.
>     > 5. Actual article content saved as search text
>     >
>     > Same is actual for latest ApprovedRevs. I've checked additionally
>     > changes in Database.php in git, it always was "false" there. I am
>     > confused o_O
>     >
>     > 30.04.2016 0:21, Vedmaka пишет:
>     >> Hey Yaron, thanks for a lightning speed response :)
>     >>
>     >> Yep, page is displaying correctly (blank), but i am able to find
>     it by
>     >> searching its contents via search (huh?).
>     >>
>     >> I made some quick debug and figured out that
>     >>
>     >> ApprovedRevsHooks::updateLinksAfterEdit
>     >>
>     >> properly sends empty $text to LinksUpdate, however in
>     >>
>     >> ApprovedRevsHooks::setSearchText
>     >>
>     >> it retrieves actual article text by hitting
>     >>
>     >> $revisionID != $article->getLatest()
>     >>
>     >> condition. I guess it is happening because above $revisionID
>     returned by
>     >> ApprovedRevs::getApprovedRevID( $title ) is false instead of
>     null. I am
>     >> investigating it further .. :)
>     >>
>     >> 29.04.2016 23:53, Yaron Koren пишет:
>     >>> That's certainly not intended behavior. Is the page displaying
>     >>> correctly, i.e. blank? And can you find by searching on its contents
>     >>> from Special:Search? (Hopefully not.)
>     >>>
>     >>> Also, I'd recommend upgrading to the latest Approved Revs
>     version, 0.7.1
>     >>> - who knows, that might be a bug that got fixed.
>     >>>
>     >>> On Fri, Apr 29, 2016 at 4:33 PM, Vedmaka
>     >>> <[hidden email]
>     <mailto:[hidden email]>
>     >>> <mailto:[hidden email]
>     <mailto:[hidden email]>>> wrote:
>     >>>
>     >>>     Hi, Guys!
>     >>>
>     >>>     I did not touch ApprovedRevs for long time, so, maybe, I
>     forgot some
>     >>>     details, but recently i was surprised a bit:
>     >>>
>     >>>     I am using MW 1.25.1 + SMW 2.3.1 + ApprovedRevs 0.7 (REL1_25
>     branch)
>     >>>     ApprovedRevs configured with
>     $egApprovedRevsBlankIfUnapproved = true;
>     >>>
>     >>>     Once i create or edit page (as normal user, without
>     auto-approve rights)
>     >>>     with some semantic property inside and go to Special:Browse
>     - i see all
>     >>>     my changes there in factbox. It seems like ApprovedRevs did
>     not affect
>     >>>     SMW anyhow - all changes get passed to SMW, so my edit
>     reflects in all
>     >>>     ask-queries.
>     >>>
>     >>>     This seems very strange for me, can someone confirm - is it
>     a bug or
>     >>>     intended behavior?
>     >>>
>     >>>
>     >>>
>      ------------------------------------------------------------------------------
>     >>>     Find and fix application performance issues faster with
>     Applications
>     >>>     Manager
>     >>>     Applications Manager provides deep performance insights into
>     >>>     multiple tiers of
>     >>>     your business applications. It resolves application problems
>     quickly and
>     >>>     reduces your MTTR. Get your free trial!
>     >>>     https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>     >>>     _______________________________________________
>     >>>     Semediawiki-devel mailing list
>     >>>
>      [hidden email]
>     <mailto:[hidden email]>
>     >>>
>      <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     >>>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>     >>>
>     >>>
>     >>>
>     >>>
>     >>> --
>     >>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>     >>>
>     >>>
>     >>>
>     ------------------------------------------------------------------------------
>     >>> Find and fix application performance issues faster with
>     Applications Manager
>     >>> Applications Manager provides deep performance insights into
>     multiple tiers of
>     >>> your business applications. It resolves application problems
>     quickly and
>     >>> reduces your MTTR. Get your free trial!
>     >>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>     >>>
>     >>>
>     >>>
>     >>> _______________________________________________
>     >>> Semediawiki-devel mailing list
>     >>>
>     [hidden email]
>     <mailto:[hidden email]>
>     >>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>     >>>
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Find and fix application performance issues faster with
>     Applications Manager
>     >> Applications Manager provides deep performance insights into
>     multiple tiers of
>     >> your business applications. It resolves application problems
>     quickly and
>     >> reduces your MTTR. Get your free trial!
>     >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>     >> _______________________________________________
>     >> Semediawiki-devel mailing list
>     >>
>     [hidden email]
>     <mailto:[hidden email]>
>     >> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Find and fix application performance issues faster with
>     Applications Manager
>     > Applications Manager provides deep performance insights into
>     multiple tiers of
>     > your business applications. It resolves application problems
>     quickly and
>     > reduces your MTTR. Get your free trial!
>     > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>     > _______________________________________________
>     > Semediawiki-devel mailing list
>     >
>     [hidden email]
>     <mailto:[hidden email]>
>     > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>     >
>
>
>     --
>
>     _____________________________________________________________
>     Mediawiki & Semantic Mediawiki support: https://mediawiki.pro
>
>
>
>
>
>
>     ------------------------------------------------------------------------------
>     Mobile security can be enabling, not merely restricting. Employees who
>     bring their own devices (BYOD) to work are irked by the imposition
>     of MDM
>     restrictions. Mobile Device Manager Plus allows you to control only the
>     apps on BYO-devices by containerizing them, leaving personal data
>     untouched!
>     https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>     _______________________________________________
>     Semediawiki-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>
>
>
> _______________________________________________
> Semediawiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>


--

_____________________________________________________________
Mediawiki & Semantic Mediawiki support: https://mediawiki.pro






------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Semediawiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel