Closed miltechniks closed 1 year ago
Same here. The /groups request with limit -1 returns the 500 error response:
An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1' at line 1
I confirm this behavior. CT devs made an improvement of their API which broke my hackish approach for efficient pagination bypassing. :(
Due to our status as self-hosters, I was able to patch ChurchTools directly. If you are self-hosters, you can do the same in the source code. WARNING: This is officially violating CT EULA, although CT devs will probably tolerate it for the sake of customer satisfaction!
In system/src/Api/ApiPaginator.php
, Zeile 31
, replace $this->limit = $limit;
by $this->limit = $limit < 1 ? PHP_INT_MAX : $limit;
This will fix it temporarily, while I'm working on a fixed ctldap
version using the old API calls because of @djschilling's advice, see here for our discussion: https://forum.church.tools/topic/9606/version-3-100-0/8
See also #44 for a temporary solution, which is however very slow for very large amounts of users.
Fixed in 3.0.2, therefore closing. Limits are currently hardcoded for ChurchTools 3.0.100 and higher!
With the latest Update of Churchtools today with the Version 3.100 the Wrapper is broken. I had a look to the Logs (Debug enabled) and there I can see that the server sends an HTTP Response Code 500 back. As far, as I understand the JavaScript Code, the request is to /api/persons and /api/groups When I test the requests with Swagger from Churchtools (/api) the request for /api/persons does require really long but return successfully a result. The request to /api/groups returns an error back. Is there anyone else with this problem?
I used the latest Version of the Wrapper.
And here are the logs (redacted):