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

Exception when changing access level of a Nextcloud user #57

Closed
rettenbs opened this issue Jun 20, 2021 · 3 comments
Closed

Exception when changing access level of a Nextcloud user #57

rettenbs opened this issue Jun 20, 2021 · 3 comments

Comments

@rettenbs
Copy link

Hi, i get an exception when changing the access level of a Nextcloud user in a Cospend project.

Steps to reproduce:

  1. Create a new Cospend project
  2. Add a Nextcloud user to the project
  3. Change the access level of the new user

Result:
You can see an error message pop and the access level is not changed.

The Nextcloud log shows the following error:

[index] Error: Exception: Call to undefined method OC\DB\QueryBuilder\QueryBuilder::executeStatement() at <<closure>>

0. /srv/www/nextcloud/lib/private/AppFramework/App.php line 152
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Cospend\Cont ... }}, "addUserShare")
1. /srv/www/nextcloud/lib/private/Route/Router.php line 309
   OC\AppFramework\App::main("OCA\\Cospend\\C ... r", "addUserShare", OC\AppFramework\ ... {}, {projectid: "ges ... "})
2. /srv/www/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/apps/cospend/p ... e")
3. /srv/www/nextcloud/index.php line 37
   OC::handleRequest()

POST /nextcloud/index.php/apps/cospend/projects/geschenke/user-share
from 146.52.193.171 by sebastian at 2021-06-19T23:59:21+00:00

Version:
Nextcloud 20.0.10
Cospend 1.3.6

Preanalysis:
I did a bit of digging the code. The undefined function is added for Nextcloud 22. Relevant PRs:

I am not sure if this is Nextcloud server issue or a Cospend issue. So far, I have seen this issue only with Cospend and no other app.

Workaround:
I copied the new executeStatement function from Nextcloud 22 to my installation. The function is basically a wrapper for execute. This resolved the issue for me.

julien-nc pushed a commit that referenced this issue Jun 20, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc
Copy link
Owner

Thanks for the bug report. This is a mistake. I mixed up the changes from 2 branches. The new db method call shouldn't be in v1.3.6.

v1.3.7 is out and should work fine with Nextcloud 20. Could you confirm?

@rettenbs
Copy link
Author

v1.3.7 fixed the issue. I could remove the workaround. Thanks for the quick fix.

@julien-nc
Copy link
Owner

Thanks for the feedback!

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

No branches or pull requests

2 participants