My drupal site's database named is db_drupal with table prefix drupal_. When I switch to Adminster - Site building - Easy Translator - Translate(/admin/build/translator/translate),there are warnings:
user warning: Table 'db_drupal.locales_source' doesn't exist query: SELECT COUNT(*) FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'en' WHERE 1=1 in sites\all\modules\vitzo_easy_translator\translator.module on line 229.
user warning: Table 'db_drupal.locales_source' doesn't exist query: SELECT *, s.lid AS lid FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'en' WHERE 1=1 ORDER BY s.source LIMIT 0, 50 in sites\all\modules\vitzo_easy_translator\translator.module on line 229.
It is because my drupal 6.13 database has a prefix drupal_ , but the Easy Translator can not find it.
Comments
Comment #1
terrytian commentedAdd {} braces outside of the variables locales_source and locales_target before line 229 and 474.
and it's OK.
Comment #2
cyaneo commentedFound it!
Comment #3
colinf commentedI'm having similar error message as above, (see below) due to being new to php, I am applying the braces in the wrong location and getting white screen, Could you show me as in "paste a scetion of php", so I know exactly where I am aplying this to. Sorry I know this will be very basic for many, but got me stuck.
thanks
user warning: Table 'web126-a-drup-19.locales_source' doesn't exist query: SELECT COUNT(*) FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'en' WHERE 1=1 in /home/sites/gejradar.com/public_html/pl2/sites/all/modules/vitzo_easy_translator/translator.module on line 229.
user warning: Table 'web126-a-drup-19.locales_source' doesn't exist query: SELECT *, s.lid AS lid FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'en' WHERE 1=1 ORDER BY s.source LIMIT 0, 50 in /home/sites/gejradar.com/public_html/pl2/sites/all/modules/vitzo_easy_translator/translator.module on line 229.
Comment #4
colinf commentedISSUE RESOLVED - put {} round locales_source & locales_target as advised
$query = "SELECT *, s.lid AS lid
FROM {locales_source} s LEFT JOIN {locales_target} t
ON s.lid = t.lid AND t.language = '$lang_code'
WHERE $search_string $filter
ORDER BY $order_string
";
$cq = "SELECT COUNT(*)
FROM {locales_source} s LEFT JOIN {locales_target} t
ON s.lid = t.lid AND t.language = '$lang_code'
WHERE $search_string $filter
";