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.
After installing the module and creating a new template, i got this message :
user warning: Unknown column 'n.language' in 'where clause' query: SELECT * FROM send_template st WHERE (n.language ='fr' OR n.language ='' OR n.language IS NULL) ORDER BY name ASC
I found the problem, caused by a call to db_rewrite_sql without telling the $primary_table so the primary table is assumed to be node.
See the patch attached.
--
Samuel
Comment | File | Size | Author |
---|---|---|---|
send_db_rewrite.patch | 505 bytes | samuelsov |
Comments
Comment #1
mcdruidwas seeing the same error with i18n installed, and the patch seems to fix it for me - thanks
Comment #2
ricovandevin CreditAttribution: ricovandevin commentedPatch worked fine for me too. Thanks!
Module maintainers please commit patch to the next release.
Comment #3
Allie MickaCommitted. Thanks a lot, samuelsov!
Comment #5
saiprasad kandavalli CreditAttribution: saiprasad kandavalli commentedHi guys, i am facing the same problem i saw the patch.
if ($active_only) {
$sql[0] .= " WHERE status = 1";
}
- $sql[0] = db_rewrite_sql($sql[0] . tablesort_sql($sort));
+ $sql[0] = db_rewrite_sql($sql[0] . tablesort_sql($sort), 'send_template');
if ($pager_limit) {
$res = call_user_func_array('pager_query', $sql);
How to insert this????? In which file???