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

API: Can not get form in XML format #1469

Closed
susnux opened this issue Jan 29, 2023 · 4 comments · Fixed by #1705
Closed

API: Can not get form in XML format #1469

susnux opened this issue Jan 29, 2023 · 4 comments · Fixed by #1705
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working upstream Blocked or cause by an upstream issue

Comments

@susnux
Copy link
Collaborator

susnux commented Jan 29, 2023

Describe the bug
Currently it is not possible to get a form, using the API, in the xml format, only JSON is possible.
The response a HTTP 200, with empty content and following error in the server log:

{
  "reqId": "lDSN6tYXk1tWzlUNgifS",
  "level": 3,
  "time": "2023-01-29T14:59:32+00:00",
  "remoteAddr": "172.18.0.1",
  "user": "admin",
  "app": "PHP",
  "method": "GET",
  "url": "/ocs/v2.php/apps/forms/api/v2/form/1",
  "message": "TypeError: XMLWriter::writeElement(): Argument #2 ($content) must be of type ?string, stdClass given at /var/www/html/lib/private/AppFramework/OCS/BaseResponse.php#148",
  "userAgent": "curl/7.87.0",
  "version": "26.0.0.2",
  "data": {
    "app": "PHP"
  }
}

To Reproduce
Steps to reproduce the behavior:

  1. curl -v -u admin:admin -X GET 'http://localhost:8080/ocs/v2.php/apps/forms/api/v2/form/1' -H "OCS-APIRequest: true"
  2. See empty response

Expected behavior
OCS response with form in XML format.

Nextcloud (please complete the following information):

  • Nextcloud-Version: 26 (current master)
  • Forms-Version: current main

Additional context
Add any other context about the problem here.

@susnux susnux added bug Something isn't working 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Jan 29, 2023
@jotoeri
Copy link
Member

jotoeri commented Jan 31, 2023

Sounds more like a server bug, no? 🤔

@susnux
Copy link
Collaborator Author

susnux commented Jan 31, 2023

Could be, I had no time to investigate this further but I wanted to report it at least, so it does not get forgotten.

@Chartman123
Copy link
Collaborator

Might be related to this server issue: nextcloud/server#33330

@Chartman123 Chartman123 added 1. to develop Accepted and waiting to be taken care of upstream Blocked or cause by an upstream issue and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Mar 5, 2023
@AlexM4H
Copy link

AlexM4H commented Aug 31, 2023

BTW: Same behaviour with

curl -v -u admin:admin -X GET 'http://localhost:8080/ocs/v2.php/apps/forms/api/v2.1/submissions/{hash}' -H "OCS-APIRequest: true"

without the new feature nextcloud/server#38745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working upstream Blocked or cause by an upstream issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants