Hi, I just tried to translate a menu in a database called 'choir' that is also using table prefixes. I get the following error messages:
* user warning: Table 'choir.translatable_object' doesn't exist query: INSERT INTO translatable_object (tid,object_name,object_key,object_field,translation,locale) VALUES (3,'menu','133','title','Der Chor','de') in D:\wamp\drupal5\includes\database.mysql.inc on line 172.
* user warning: Table 'choir.translatable_object' doesn't exist query: INSERT INTO translatable_object (tid,object_name,object_key,object_field,translation,locale) VALUES (4,'menu','133','description','Über den Chor','de') in D:\wamp\drupal5\includes\database.mysql.inc on line 172.
It seems that the table prefix is not applied.
Comment | File | Size | Author |
---|---|---|---|
#2 | translatable.database.inc_.patch | 2.16 KB | sun |
#1 | translatable.database.inc_.patch | 870 bytes | Bodo Maass |
Comments
Comment #1
Bodo Maass CreditAttribution: Bodo Maass commentedOk, to fix this one has to change line 179 in translatable.database.inc into:
Patch is attached.
I presume that line 210 in this file is also not working with prefixes:
The curly braces will be parsed by php as delimiters of the variable name to be replaced. So one can either use two curly braces:
or pass the table name as a parameter to the db_query function:
Comment #2
sunThanks for this bug report. Please test attached patch.
Comment #3
Bodo Maass CreditAttribution: Bodo Maass commentedSeems to work fine on a system with table prefixes. I made sure both the insert and the update case were executed.
Comment #4
sunThanks, committed.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.