Cant remove passwords after upgrade to 3.1.0

Checklist
[ x] I have read intro post: About the Installation Issues category
[ x] I have read the tutorials, help and searched for similar issues
[ x] I provide relevant information about my server (component names and versions, etc.)
[x ] I provide a copy of my logs and healthcheck
[x ] I describe the steps I have taken to trouble shoot the problem
[ x] I describe the steps on how to reproduce the issue

I am running the following:
Ubuntu 20.04
PHP 7.4
Mysql 8.0
Passbolt 3.1.0

I upgraded passbolt from 2.13 to 3.1.0 after that I couldnt read new added passwords (internal server error) but i found i forgot to clear the cache after that the problem was solved.
However I can not delete passwords I get the notification password deleted succesfully but it wont.

Error in log when trying to remove a password:
Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘groups Groups INNER JOIN groups_users GroupsUsers ON Groups.id = (GroupsUsers.gr’ at line 1 (/var/www/passbolt_api/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php:37)
Request URL: /resources/a2506631-eb60-4810-b38c-4d5374f2e986.json?api-version=v2

Error in log when refreshing passbolt page:
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘groups Groups LEFT JOIN users Modifier ON Groups.modified_by = (Modifier.id) LEF’ at line 1 (/var/www/passbolt_api/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php:37)
Request URL: /groups.json?api-version=v2&contain%5Bmy_group_user%5D=1&contain%5Bmodifier%5D=0&contain%5Bgroup_user%5D=1

Healthcheck shows 0 issues

hi @nghhoese,

It could be because ‘groups’ is a reserved keyword in Mysql8 and you may not have it enabled.
Can you check in your app.php if there is the following line.

'quoteIdentifiers' => env('DATASOURCES_QUOTE_IDENTIFIER', true),

This is to make sure that quoteIdentifiers is set to true by default if the DATASOURCES_QUOTE_IDENTIFIER environment variable is not set. By default it was not on v2.x.

1 Like

Thank you! The quoteidentifiers was set to false nothing more replaced it with your line and now everything works fine!

2 Likes