Page MenuHomePhabricator

Inline-Queries don't respect new values on their own page
Closed, DeclinedPublic

Description

When you try to get some values via inline query from the own page where the query is defined but you change the value in the same article revision, you will get the old value which is no longer the right one.

Queries should always show the current values, not some old ones. Actually they always show old values before the first page purge and purging a page always after saving the article is not really an option.

Some users might have used this miss behaviour in templates to compare parameter values with the old value assigned as attribute to see whether there was a change or not. For doing so there should be a new parser function or a parameter for #ask and #show which allows to get the previous value which was assigned. After another page purge it would return the same value as the corrected #ask or #show function because the value before the purge is the same value than after the purge.

The new parameter could be something like cached=true.

If you have doubts about changing the whole behaviour of inline queries with that perhaps the better solution would be cached=true is the default and you can change it with cached=false.


Version: unspecified
Severity: normal

Details

Reference
bz21888

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:55 PM
bzimport set Reference to bz21888.

This behaviour is a fundamental consequence of the order in which a page is processed when it is stored: first the wiki text is parsed and expanded, second the text and extracted data (information for "what links here", categories, SMW data) is stored. So the result of the query is computed before the data is stored. I do not see how we can change this in a practically feasible way. The current behaviour is certainly not a deliberate design choice for helping people to compare old values; we really have no idea how to do it differently.

Regarding the "cached" option, I note that SMW does not store a history of its data. So there is only a single copy of the data in the data base at any time, and we cannot provide an option for selecting another older version.

I understand. So perhaps you could add something that the page won't end up in the cache or use the job queue after saving the article so that the first person who will enter the page will trigger an purge automatically.
Only the editor would see the wrong datas in this scenario. But perhaps this will already need to much performance on big wikis and it won't be anything else than processing the page two times in a row...

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.