SQL warning if a vocabulary has no terms selected

Created on 13 January 2011, almost 14 years ago
Updated 18 April 2024, 8 months ago

I have two taxonomy vocabularies selected as unique fields, uniqueness is set for each individually, not in combination.

If a node is saved with a term selected in only one of the two vocabularies (i.e., no term is selected in the other vocabulary), the user gets this warning message:

user warning: 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 ') AND node.type = 'mynodetype'' at line 1 query: SELECT node.nid FROM node node JOIN term_node term_node USING (vid) WHERE term_node.tid IN() AND node.type = 'mynodetype' in /var/www/drupal/sites/all/modules/unique_field/unique_field.module on line 381.

Despite this warning, everything appears to work properly. The node is saved, and no additional nodes can be created with the same term. But I thought I'd bring this to your attention.

In case it matters: I'm using CCK3, also Vocabulary Permissions.

πŸ› Bug report
Status

Closed: outdated

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brianbrarian

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024