Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Different behavior between #show and #ask with self-referencing parameters #1478
Setup and configuration
This is more a question than an issue, since I found a (non-satisfaying) way to solve my issue.
On a template of my wiki, I created parameters self-referencing. You will find a lighter example on  and  of what I did. Of course, in order not to call non defined-yet parameters, I use whenever I can local variables (thanks to the
One strange thing I can not reproduce on SMW sandbox, is that if I use
Can something explain why I could have such a difference of result on my wiki?
Once again, this is not a real issue because
Thank you in advance for the time you will take to answer me!
This  should give some insights on the topic of self-reference.
The sandbox is using 2.4-alpha which comes with the default deferred update mode (#1435) and it has the
Thanks for your link, hopefully my own code is coherent with the proper way to self-reference!
Ok, so it's about automatically refreshing the parser cache which is not done yet, but should be in 2.4 version of SMW. Good to know!
But still, to me
Not really, the comment was made in connection with how MW execute updates and how SWM corresponds to those changes.
In general, the
Self-references are somewhat troublesome because a
This is correct, the underlying code is the same [0, 1].
It depends on when the update is finished (which could be queued, deferred etc) and whether the parser cache is outdated or not when the view event is triggered.
One could improve the situation with "pure" self-references that do not involve setting values via a template but as soon as templates are involved it is getting complicated because the template execution does happen in another transaction and can even be pushed into a job.
For the given reasons, #1696 is hinting how to improve the situation.