file:translatable.database.inc
line: 179
code:
db_query("INSERT INTO {$table} (". implode(',', $fields['columns']) .") VALUES (". implode(',', $fields['types']) .")", $fields['values']);
I have drupal installed with table prefix "demo_" for all tables. Module raises error on new translation submit:
Table node_translatable doen't exists
It happens because according to PHP string variable behavior, after replacing "{$table}" by value of variable $table, PHP engine cleans tags "{" & "}", so, we need to apply this change in code for #translatable module to work with tables with prefixes:
db_query("INSERT INTO {".$table."} (". implode(',', $fields['columns']) .") VALUES (". implode(',', $fields['types']) .")", $fields['values']);
Comments
Comment #1
gildedgod commentedThe same on 210 line too
- from:
- to:
Comment #2
sunThis was already fixed in #244276: doesn't seem to work with db table prefix. You might want to consider updating to the latest development snapshot.