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

Add CHAIN field support in datatables ajax API #829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hkwi
Copy link

@hkwi hkwi commented Apr 17, 2024

How to reproduce

Create a page with following content

{{#subobject: A |Text=A }}
{{#subobject: B |Text=B }}
{{#subobject: C |Text=C }}
{{#ask:
[[-Has subobject::{{FULLPAGENAME}}]]
|?Has subobject.Text
|format=datatables
|datatables-pageLength=2
|limit=1
}}

When SMW renders the page, Processing... and Loading... stays displayed.

image

Following is the response from api action=ext.srf.datatables.api, in browser devtool.

{
    "error": {
        "code": "internal_api_error_InvalidArgumentException",
        "info": "[3f28f227f0de38a93bb53121] Exception caught: Data provided for print request does not fit the type of printout.",
        "errorclass": "InvalidArgumentException",
        "*": "InvalidArgumentException at /var/www/html/extensions/SemanticMediaWiki/src/Query/PrintRequest.php(98)\nfrom /var/www/html/extensions/SemanticMediaWiki/src/Query/PrintRequest.php(98)\n#0 /var/www/html/extensions/SemanticResultFormats/formats/datatables/Api.php(124): SMW\\Query\\PrintRequest->__construct(integer, string, NULL, string, array)\n#1 /var/www/html/includes/api/ApiMain.php(1907): SRF\\DataTables\\Api->execute()\n#2 /var/www/html/includes/api/ApiMain.php(884): ApiMain->executeAction()\n#3 /var/www/html/includes/api/ApiMain.php(855): ApiMain->executeActionWithErrorHandling()\n#4 /var/www/html/api.php(91): ApiMain->execute()\n#5 /var/www/html/api.php(46): wfApiMain()\n#6 {main}"
    }
}

@thomas-topway-it
Copy link
Contributor

@hkwi Hiroaki, I'm sorry for the delay, could you please add in the description an easy setup for testing ? thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants