SQL Error at checkPrivateMessageMemberExists nethod

Created on 28 January 2024, about 1 year ago
Updated 11 February 2024, about 1 year ago

Problem/Motivation

Drupal\Core\Database\DatabaseExceptionWrapper: 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 ') AND user_data.status = 1 LIMIT 0, 1' at line 1: SELECT 1 FROM "users_field_data" AS user_data LEFT JOIN "user__roles" AS user_roles ON user_roles.entity_id = user_data.uid LEFT JOIN "config" AS role_config ON role_config.name = CONCAT('user.role.', user_roles.roles_target_id) LEFT JOIN "config" AS authenticated_config ON authenticated_config.name = :authenticated_user_role WHERE user_data.name = :username AND user_roles.roles_target_id IN () AND user_data.status = 1 LIMIT 0, 1; Array ( [:username] => drupal113 [:authenticated_user_role] => user.role.authenticated ) in Drupal\private_message\Mapper\PrivateMessageMapper->checkPrivateMessageMemberExists() (line 256 of modules/contrib/private_message/src/Mapper/PrivateMessageMapper.php).

Steps to reproduce

1. Install fresh Drupal 10 instance.
2. Enable Private Message module.
3. DO NOT grant "use private messaging system" to any user role.
4. Try to send a private message.
5. An ajax call to validate the user name will return an error.

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine bohart Lutsk, Ukraine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024