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
Default values for SMW {{#show:}} calls reliably do not work on non-existing pages if the page we ask data from has any incoming properties. #3588
Comments
I wanted to provide quick feedback!
Incoming entities as those seen in The
I haven't look at the issue at all and I won't find time within the next couple of weeks to attend this issue unless someone else can distill it and provide a fairly simple use (== test) case/scenario. I appreciate the links and description but it would still require a considerable effort from my side to review the content, identify, and dissect the issue, so I'm asking others (@kghbln @hexmode @krabina @planetenxin @s7eph4n @jamesmontalvo3) to fill in the blanks allowing me not to be involved and answer each and every ticket. |
@FO-nTTaX does the issue occur after a change in the software environment (e.g. update)? Has a similar setup been working on a different software environment (e.g. with SMW 2.x)? |
@gesinn-it We updated from 2.5.8 where it worked to 3.0.0 where it does not. We did not change anything but SMW, so I can pretty much exclude external factors (also that test wiki I linked has nothing else installed). |
PremiseIt should be noted that Whether [[SMW Mentionned Page]] (or [[SMW Not Mentionned Page]]) exists in MW or not as page is irrelevant, in SMW it represents a valid entity in terms of its object space meaning that has an ID and can be used as referential object instance. IssueIf I'm not mistaken then this relates to the #2488 (Rework List format) change. In 2.5.8 the SemanticMediaWiki/includes/queryprinters/ListResultPrinter.php Lines 190 to 193 in 801d56b
while with 3.0 it returns SemanticMediaWiki/src/Query/ResultPrinters/ListResultPrinter.php Lines 106 to 115 in 9bc0e8f
Adding Tasks
|
The fix you have suggested seems to work on my test wiki from what I see after adding it to the file. |
I will try to tackle this and send a PR together with it. |
Setup and configuration
Issue
Default values for SMW {{#show:}} calls reliably do not work if the page we ask data from has any incoming properties. An example can be seen here: https://wiki.liquipedia.space/wiki/index.php/SMW_Default_Value
Both
SMW Mentionned Page
AndSMW Not Mentionned Page
page do not exist, butSMW Mentionned Page
has incoming data as another page has the page title set as a property: https://wiki.liquipedia.space/wiki/index.php?title=SMW_Mentioning_Page&action=editSee also https://wiki.liquipedia.space/wiki/index.php/Special:Browse?title=Special%3ABrowse&article=SMW+Mentionned+Page and https://wiki.liquipedia.space/wiki/index.php/Special:Browse?title=Special%3ABrowse&article=SMW+Not+Mentionned+Page
In https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/Query/ResultPrinters/ResultPrinter.php#L326
$results->getCount()
will return 1 forSMW Mentionned Page
, even though the page does not exist at all.Steps to reproduce
I included a minimal testcase above, relevant URLs are
The text was updated successfully, but these errors were encountered: