After uninstalling several multi-language-related modules (I do not remember which - it was for a multilingual client demo a few months ago), I get language table errors while using some modules (e.g. Storm):

user warning: Table 'site.languages' doesn't exist query: SELECT * FROM languages ORDER BY weight ASC, name ASC in /var/www/drupal/includes/bootstrap.inc on line 1134.

I am running drupal 6.10 on linux.

It looks like this table is installed by the locale (core) module, and I know for a fact that I never touched the core.
How might I begin to fix this situation? It's a showstopper (demoing storm to a client).

I don't particularly want to install from scratch, but will if you think I have to.

EDIT:
I just found the following orphan tables at /admin/build/schema/compare
# i18n_blocks
# i18n_strings
# i18n_variable

Could these have replaced 'languages' when i18n was installed?

Thanks!

Comments

newbie999’s picture

I'm running into the same problem. Have you found a solution? If so, can you please let me know. I can use the help. Thanks so much for your time.

newbie999’s picture

I just fixed it - I re-enabled the Locale module, saved and the errors went away. I then went back and disabled it again - no errors this time.

loze’s picture

I get this after disabling the locale module, and then uninstalling it at admin/build/modules/uninstall.
If i re enable it, the error goes away, but I want to uninstall it.
any tips?

Murzzz’s picture

Well. When we uninstall module Locale, their is stiil variable 'language_count'. And if it's value more than 1, function language_list() looks for a table {languages}.

So set this variable to 1 or delete it

loze’s picture

This worked for me.

edumdq’s picture

I had the same problem, it worked, thanks!

2noame’s picture

Thank you for the fix, but I don't know enough to feel comfortable changing settings around in bootstrap. Here's the code when locale has been installed and removed, but not uninstalled. If I uninstall I'll get errors. What do I change exactly?

/**
 *  Choose a language for the current page, based on site and user preferences.
 */
function drupal_init_language() {
  global $language, $user;

  // Ensure the language is correctly returned, even without multilanguage support.
  // Useful for eg. XML/HTML 'lang' attributes.
  if (variable_get('language_count', 1) == 1) {
    $language = language_default();
  }
  else {
    include_once './includes/language.inc';
    $language = language_initialize();
  }
}

/**
 * Get a list of languages set up indexed by the specified key
 *
 * @param $field The field to index the list with.
 * @param $reset Boolean to request a reset of the list.
 */
function language_list($field = 'language', $reset = FALSE) {
  static $languages = NULL;

  // Reset language list
  if ($reset) {
    $languages = NULL;
  }

  // Init language list
  if (!isset($languages)) {
    if (variable_get('language_count', 1) > 1 || module_exists('locale')) {
      $result = db_query('SELECT * FROM {languages} ORDER BY weight ASC, name ASC');
      while ($row = db_fetch_object($result)) {
        $languages['language'][$row->language] = $row;
      }
    }
    else {
      // No locale module, so use the default language only.
      $default = language_default();
      $languages['language'][$default->language] = $default;
    }
  }
joelbox-mondial-it’s picture

use Devel, take menu option "variable editor" and find language count there.

richardp’s picture

For anyone who finds this in the future, I had to delete the language_count, and any other variables with "language" in the title, and then I had to clear my cache. It did not work for me until I cleared the cache.

Richard