-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
ParentProperties not shown with format=datatables #825
Comments
Okay, after some debugging I found "the problem". In DataTabels.php I moved
I am not sure if this is a correct fix or that it will cause other problems but now at least the outputted table is complete again. |
@jongfeli can you please try with the latest version of Datatables ? https://github.com/semanticMediaWiki/SemanticResultFormats --- we have merged it right 2 days ago. Thanks a lot |
Hi @thomas-topway-it I downloaded the code but I still need to move |
ok, thank you, I will review it soon |
I run into the same problem, and looked into the code. Sorry, that was not correct. I looked into the code again, and wrote a patch SemanticMediaWiki/SemanticMediaWiki/pull/5623 , that should fix the problem... |
There is a case that key from makeCacheKey is same, but fingerprint from subjects are different, typically with subobject property path resolution. SemanticMediaWiki/SemanticResultFormats#825 Using same PrefetchCache, if there comes new prefetch call with same key but different fingerprint, then the old cache will be replaced with the new result. I think we should merge the result here.
hello Iroaki, @hkwi I wanted to post that the idea about resetting the iterator was a great hint (anyway). So do you confirm that the provided patch fixes the issue, and that is not related to Datatables ? |
With Datatables plugin scans the QueryResult twice, while many plugins scan once. In the first scan, results are all filled, but in the second scan, cache is broken and values are lost. First scan will be triggerd by |
@thomas-topway-it can you test the patch in our FINA wiki, so we can confirm everything is still working? |
I have just came across this issue in my wiki, too. |
@jongfeli please test the master version, it works for me now.
|
@jaideraf, yes it is working just fine, thank you. |
Setup
Issue
Anything above SRF 4.0.2 will break to following query when the format=datatables is used.
When there are multiple results it will show all the SubobjectProperties but only one or none of the ParentProperties:
Steps to reproduce
Made an example in the SMW sandbox but it is running SRF 4.0.2 so it is still working.
See: https://sandbox.semantic-mediawiki.net/wiki/Subobject_In_Datatables
The result with 4.0.2:
The result with SRF 4.2.1 would look something like this:
Best regards,
Felipe.
The text was updated successfully, but these errors were encountered: