When running an installation profile with PHP 5.5 that enables the Taxonomy module the installer fails with the following error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'taxonomy_vocabulary' doesn't exist

I ran the install via "drush si" and it results in the following:

Starting Drupal installation. This takes a few seconds ...
WD registry: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'taxonomy_vocabulary' doesn't exist: SELECT name, machine_name, vid FROM {taxonomy_vocabulary};
Array
(
)
 in taxonomy_vocabulary_get_names() (line 991 of modules/taxonomy/taxonomy.module).
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'taxonomy_vocabulary' doesn't exist: SELECT name, machine_name, vid FROM {taxonomy_vocabulary};
Array
(
)
 in taxonomy_vocabulary_get_names() (line 991 of modules/taxonomy/taxonomy.module).
Cannot modify header information - headers already sent by (output started at /root/.composer/vendor/drush/drush/includes/output.inc:38) bootstrap.inc:1217
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'taxonomy_vocabulary' doesn't exist: SELECT name, machine_name, vid FROM {taxonomy_vocabulary}; Array
(
)
 in taxonomy_vocabulary_get_names() (line 991 of modules/taxonomy/taxonomy.module).
Drush command terminated abnormally due to an unrecoverable error.

The server is running PHP 5.5.9 on Ubuntu 12.04:

$ php -v
PHP 5.5.9-1+sury.org~precise+1 (cli) (built: Feb 13 2014 15:53:53) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
CommentFileSizeAuthor
#10 panelizer-n2211313-10.patch2.16 KBdamienmckenna

Comments

damienmckenna’s picture

damienmckenna’s picture

I tried adding the following to the top of install.php but it made no difference:

ini_set('opcache.enable', 0);
damienmckenna’s picture

Adding the opcache.enable=0 line straight into php.ini (and restarting Apache) made no difference either.

damienmckenna’s picture

Further debugging..

I modified taxonomy_vocabulary_get_names() in taxonomy.module to add these at the top of the function:

  $b = debug_backtrace();
  foreach ($b as &$c) {
    if (isset($c['args'])) {
      unset($c['args']);
    }
  }
  print_r($b);

This removes the arguments passed to each function in the backtrace, avoiding an inane volume of output.

The resulting output was:

Array
(
    [0] => Array
        (
            [file] => modules/taxonomy/taxonomy.module
            [line] => 117
            [function] => taxonomy_vocabulary_get_names
        )

    [1] => Array
        (
            [function] => taxonomy_entity_info
        )

    [2] => Array
        (
            [file] => includes/module.inc
            [line] => 895
            [function] => call_user_func_array
        )

    [3] => Array
        (
            [file] => includes/common.inc
            [line] => 7636
            [function] => module_invoke_all
        )

    [4] => Array
        (
            [file] => sites/all/modules/contrib/panelizer/panelizer.module
            [line] => 474
            [function] => entity_get_info
        )

    [5] => Array
        (
            [file] => sites/all/modules/contrib/ctools/includes/plugins.inc
            [line] => 732
            [function] => panelizer_entity_plugin_process
        )

    [6] => Array
        (
            [file] => sites/all/modules/contrib/ctools/includes/plugins.inc
            [line] => 699
            [function] => _ctools_process_data
        )

    [7] => Array
        (
            [file] => sites/all/modules/contrib/ctools/includes/plugins.inc
            [line] => 498
            [function] => ctools_plugin_process
        )

    [8] => Array
        (
            [file] => sites/all/modules/contrib/ctools/includes/plugins.inc
            [line] => 271
            [function] => ctools_plugin_load_includes
        )

    [9] => Array
        (
            [file] => sites/all/modules/contrib/ctools/includes/registry.inc
            [line] => 33
            [function] => ctools_get_plugins
        )

    [10] => Array
        (
            [file] => sites/all/modules/contrib/ctools/ctools.module
            [line] => 597
            [function] => _ctools_registry_files_alter
        )

    [11] => Array
        (
            [file] => includes/module.inc
            [line] => 1101
            [function] => ctools_registry_files_alter
        )

    [12] => Array
        (
            [file] => includes/registry.inc
            [line] => 65
            [function] => drupal_alter
        )

    [13] => Array
        (
            [file] => includes/bootstrap.inc
            [line] => 3205
            [function] => _registry_update
        )

    [14] => Array
        (
            [file] => includes/module.inc
            [line] => 452
            [function] => registry_update
        )

    [15] => Array
        (
            [file] => includes/install.core.inc
            [line] => 1595
            [function] => module_enable
        )

    [16] => Array
        (
            [function] => _install_module_batch
        )

    [17] => Array
        (
            [file] => includes/batch.inc
            [line] => 284
            [function] => call_user_func_array
        )

    [18] => Array
        (
            [file] => includes/form.inc
            [line] => 4530
            [function] => _batch_process
        )

    [19] => Array
        (
            [file] => includes/install.core.inc
            [line] => 443
            [function] => batch_process
        )

    [20] => Array
        (
            [file] => includes/install.core.inc
            [line] => 339
            [function] => install_run_task
        )

    [21] => Array
        (
            [file] => includes/install.core.inc
            [line] => 77
            [function] => install_run_tasks
        )

    [22] => Array
        (
            [file] => drush/includes/drush.inc
            [line] => 691
            [function] => install_drupal
        )
)
damienmckenna’s picture

Title: Enabling taxonomy via install profile, PHP 5.5 gives "Table taxonomy_vocabulary doesn't exist" error » PHP 5.5 gives "Table taxonomy_vocabulary doesn't exist" error during install profile
Project: Drupal core » Panelizer (obsolete)
Version: 7.26 » 7.x-3.x-dev
Component: install system » Code

Moving this to the Panelizer issue queue as it's the module triggering the error.

damienmckenna’s picture

My question is: is CTools at fault for triggering ctools_get_plugins() or is Panelizer at fault for entity_get_info()?

pfrenssen’s picture

This error is also symptomatic of this problem:

array_keys() expects parameter 1 to be array, null given common.inc:7032

I think this is better solved on the Panelizer side, or in core. CTools needs to provide the classes of its plugins to the registry.

travist’s picture

I ran into a very similar problem, but the issue was with the Feeds module. I assume that this module does something similar, but apparently if you call entity_get_info() from within a ctools_get_plugins() has the potential to create a wicked race condition that is hard to debug. The issue below may help.

#2223853: Installing taxonomy module after this module causes a fatal.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new2.16 KB
damienmckenna’s picture

Status: Needs review » Needs work
damienmckenna’s picture

hefox’s picture

3 modules experiencing this, worth making a ctools or core issue to fix instead?

edit: just saw the core issue, cheers!