When attempting to install a fresh site (in this case, via drush site-install), the function path_alias_xt_requirements() within path_alias_xt.install makes a call to the common function url(), without specifying an $options arrray as an argument to that function.
As a result, Drupal attempts to create an alias for this URL, and in doing so leads to a fatal error during site install because no url_alias table has been created yet during the fresh site install. The following stack trace is the result:
exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'url_alias' doesn't exist' in /docroot/includes/database/database.inc:2204 [error]
Stack trace:
#0 /docroot/includes/database/database.inc(2204): PDOStatement->execute(Array)
#1 /docroot/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array)
#2 /docroot/includes/database/database.inc(2383): DatabaseConnection->query('SELECT DISTINCT...', Array, Array)
#3 /docroot/includes/path.inc(381): db_query('SELECT DISTINCT...')
#4 /docroot/includes/path.inc(69): drupal_path_alias_whitelist_rebuild()
#5 /docroot/includes/path.inc(241): drupal_lookup_path('alias', 'sites/all/modul...', '')
#6 /docroot/includes/common.inc(2308): drupal_get_path_alias('sites/all/modul...', '')
#7 /docroot/sites/all/modules/contrib/path_alias_xt/path_alias_xt.install(22): url('sites/all/modul...')
#8 /docroot/includes/install.inc(1189): path_alias_xt_requirements('install')
#9 /docroot/includes/install.core.inc(1632): drupal_check_profile()
#10 /docroot/includes/install.core.inc(743): install_check_requirements(Array)
#11 /docroot/includes/install.core.inc(471): install_verify_requirements(Array)
#12 /docroot/includes/install.core.inc(339): install_run_task(Array, Array)
#13 /docroot/includes/install.core.inc(77): install_run_tasks(Array)
#14 /usr/local/share/drush/includes/drush.inc(720): install_drupal(Array)
#15 /usr/local/share/drush/includes/drush.inc(706): drush_call_user_func_array('install_drupal', Array)
#16 /usr/local/share/drush/commands/core/drupal/site_install_7.inc(80): drush_op('install_drupal', Array)
#17 /usr/local/share/drush/commands/core/site_install.drush.inc(289): drush_core_site_install_version('ncr', Array)
#18 [internal function]: drush_core_site_install()
#19 /usr/local/share/drush/includes/command.inc(364): call_user_func_array('drush_core_site...', Array)
#20 /usr/local/share/drush/includes/command.inc(215): _drush_invoke_hooks(Array, Array)
#21 [internal function]: drush_command()
#22 /usr/local/share/drush/includes/command.inc(183): call_user_func_array('drush_command', Array)
#23 /usr/local/share/drush/lib/Drush/Boot/BaseBoot.php(65): drush_dispatch(Array)
#24 /usr/local/share/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#25 /usr/local/share/drush/drush.php(12): drush_main()
#26 {main}
Comments
Comment #2
michael_wojcik commentedFixes issue by adding an
$optionsarray to the call to theurl()function, and settingaliastoTRUEwithin that array, in order to bypass the unnecessary call todrupal_get_path_alias().Comment #3
rdeboerThanks for the patch Michael!
Rik
Comment #7
adriancidThanks @michael_wojcik