message_subscribe queue generates a fatal error if not any context is flagged

Created on 6 October 2019, over 4 years ago
Updated 29 January 2024, 5 months ago

I got the below error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to [error]
your MySQL server version for the right syntax to use near ') AND (fc.uid > '0') AND (users.status = '1')
ORDER BY fc.uid ASC
LIMIT 100 OFFS' at line 2: SELECT DISTINCT fc.uid AS uid
FROM
{flagging} fc
INNER JOIN {users_field_data} users ON users.uid = fc.uid
WHERE () AND (fc.uid > :db_condition_placeholder_0) AND (users.status = :db_condition_placeholder_1)
ORDER BY fc.uid ASC
LIMIT 100 OFFSET 0; Array
(
[:db_condition_placeholder_0] => 0
[:db_condition_placeholder_1] => 1
)

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada minorOffense Ottawa, Canada

    It happens if you aren't using flag to set your subscribers. We use message subscribe but we pass in the list of users from some other relationship they have to the content (e.g. all group members of the same group).

    We actually don't use flag for anything on our site but still use message subscribe.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    @minorOffense,

    If you are not using flags to let users subscribe, but are maintaining who should be notified separately, have you looked at Message Notify β†’ . I will look more into this error.

Production build 0.69.0 2024