Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PDOException: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s): SELECT f.nid AS nid, f.tid AS tid FROM {forum} f WHERE (f.vid = :db_condition_placeholder_0_0, :db_condition_placeholder_0_1) in forum_node_load()
Also a bad call to db_create_table() in forum_update_7001()
Set to needs work because there should be a test for forum_node_load()
Comment | File | Size | Author |
---|---|---|---|
#2 | forum.patch | 2.54 KB | mfb |
forum.patch | 1.52 KB | mfb | |
Comments
Comment #1
catchIt's my understanding that ->condition should default to IN when given an array.
Clearly that's not working. Personally I'd rather specific IN for that case anyway, but might be worth looking into.
Comment #2
mfbOK, let's see if this passes tests. I tweaked the SelectQuery::condition() method.
Comment #3
catchLooks great.
Comment #5
catchComment #6
Dries CreditAttribution: Dries commentedAre these tests useful as is? Sure, there could be exceptions, but it feels like they could also be made more robust?
Comment #7
catchThere aren't many situations in forum.module itself where you'll get two fully loaded nodes on one page, possibly none (at least not at the moment, it's all spaghetti queries in there). However Drupal.org at least promotes forum topics to the front page, so it's a valid test I think.
Comment #8
catchhttp://drupal.org/cvs?commit=276992