Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subobject property processing issue #535

Closed
darenwelsh opened this issue Sep 4, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@darenwelsh
Copy link

commented Sep 4, 2014

It seems that there is a bug in how SMW processes revisions to properties in subobjects. Specifically the issue is when subobjects are created using values outputted from the show parser function with data from the same page (e.g. {{#show: {{PAGENAME}} |? Some property }} ).

To test this issue, open the following two pages:

Then run the following process:

  1. Edit the Data page
  2. Modify one of the values for property "Is from" (has type Page)
  3. Save the Data page
  4. Refresh the Query page

Notice how the values for the data page "Is from" has been updated to reflect your modification, but the "Has attendee" value in each object has not been updated.

Repeat the modification process above. You'll notice that the previous modification now displays in the objects' properties. So it seems they are one step behind. My theory is that SMW is processing the definition of "Is from" on the data page upon page save, but the process of passing that value along to the subobject is not happening until the page is revised one more time. Does SMW process the subobject properties before the page properties?

We're pretty sure we have used this method before with no issues in SMW 1.8, but we have recently upgraded to 2.0. Though we can't say for certain if this behavior is linked to the SMW upgrade.

@s7eph4n

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2014

Not a bug, IMO.

To call a parser function the MW parser has to first evaluate all its parameters. So it evaluates the 'show' to then use it to call 'subobject'. You might try to re-order your calls of 'set' and 'subobject' in the hope that having 'set' first will indeed evaluate 'set' first.

But really, using this kind of self-referencing you get what you ask for, which is undetermined behaviour. If you use templates for your pages, you could try using the Variables extension.

@jamesmontalvo3

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2014

Did something change between 1.8 and 2.0 that how this behaved? I'm 99%
certain this worked in 1.8.

On Thu, Sep 4, 2014 at 3:36 PM, s7eph4n notifications@github.com wrote:

Not a bug, IMO.

To call a parser function the MW parser has to first evaluate all its
parameters. So it evaluates the 'show' to then use it to call 'subobject'.
You might try to re-order your calls of 'set' and 'subobject' in the hope
that having 'set' first will indeed evaluate 'set' first.

But really, using this kind of self-referencing you get what you ask for,
which is undetermined behaviour. If you use templates for your pages, you
could try using the Variables extension.


Reply to this email directly or view it on GitHub
#535 (comment)
.

@mwjames

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2018

Not a bug, IMO.
self-referencing you get what you ask for

As a self-reference issue the topic has been addressed and explained in #1696, #1478, and #2375.

@mwjames mwjames closed this Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.