Page MenuHomePhabricator

Erroneous Special:WhatLinksHere result wrt a page using the #ask inline query
Closed, DeclinedPublic

Description

Author: najevi

Description:
When comparing effects of
(i) "&action=purge" and
(ii) a so-called "null edit" (i.e. edit/save with no changes)
a page that uses the #ask inline query is affected differently depending on whether data is being added to the database underlying SMW or removed from it.
This does not manifest in the page as displayed but rather, Special:WhatLinksHere will report an erroneous result with respect to a page that uses the SMW extension's #ask inline query.

To reproduce/illustrate: (see also URL above)

  1. PageQ has a simple inline query using #ask
  2. PageX is one of many pages displayed in the results returned by the inline query on PageQ
  3. Special:WhatLinksHere query with PageX as the subject correctly lists PageQ as a page that links to PageX

Items a,b & c,d below are intened to highlight a discrepancy between what is displayed on the page as the results of a query and what is stored 'elsewhere' (I don't know where!) as a result of the query being affected by actions (i) and (ii) mentioned already but clarified below.

  1. If PageX is either deleted from the wiki or if PageX is edited to have the template call responsible for all semantic annotations commented out or deleted then (i) upon "index.php?title=PageQ&Action=purge" ... a. PageQ inline query result DOES get updated (to no longer display a link to PageX) b. "index.php?title=Special%3AWhatLinksHere&target=PageX" result does NOT get updated (ii) upon a so-called "null edit" (i.e. edit/save with no changes) ... c. PageQ inline query result DOES get updated upon a null edit. i.e. "edit/save with no changes" d. "index.php?title=Special%3AWhatLinksHere&target=PageX" result DOES get updated (to remove PageQ from the list of "pages that link to PageX")

So 4b is inconsistent behavior in the case where a page is either deleted from the wiki or when it's semantic data is being removed from the database underlying the SMW extension.

Contrast the above with what happens when a page is _added_ to the wiki. Let PageY be created with no semantic annotations initially and call the results displayed for the standard MediaWiki query "index.php?title=Special%3AWhatLinksHere&target=PageY" our initial conditions.
(i.e. there are no pages that link to PageY)

  1. If PageY is edited to add semantic data (that is relevant to the query at PageQ) then (i) upon "index.php?title=PageQ&Action=purge" ... a. PageQ inline query result DOES get updated (to display a link to PageY) b. "index.php?title=Special%3AWhatLinksHere&target=PageY" result DOES get updated (to include PageQ in the list of "pages that link to PageY") (ii) upon a so-called "null edit" (i.e. edit/save with no changes) ... c. PageQ inline query result DOES get updated upon a null edit. d. "index.php?title=Special%3AWhatLinksHere&target=PageX" result DOES get updated

(A)
So when a page of semantic data is
ADDED to the wiki (and therefore to the database underlying the SMW extension)
there is NO inconsistent behavior
when comparing effect of "&action=purge" to a "null edit".

(B)
However, when a page of semantic data is
DELETED from the the database underlying the SMW extension
there IS an inconsistent behavior
when comparing effect of "&action=purge" to a "null edit".

Is this a MW bug or an SMW bug?

I don't know either intimately enough to judge. I have yet to see this anomalous behavior for a page that does _not_ use the #ask: inline query and that is why I am calling it an SMW bug for now.


Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC
URL: http://scratchpad.referata.com/w/index.php?title=Special%3AWhatLinksHere&target=Simply+Tai+Chi&namespace=

Details

Reference
bz20352

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:57 PM
bzimport set Reference to bz20352.
Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.