Problem/Motivation
Since upgrading from 6.31->7.27 one of two drupal sites I just updated does not load, just gives this error. Site Link
Errors:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.label' in 'field list': SELECT ta.aid, a.type, a.label FROM {trigger_assignments} ta LEFT JOIN {actions} a ON ta.aid = a.aid WHERE ta.hook = :hook ORDER BY ta.weight; Array ( [:hook] => node_view ) in trigger_get_assigned_actions() (line 193 of /home7/flameand/public_html/zorquatheimp/modules/trigger/trigger.module).
From the code on that file:
/**
* Gets the action IDs of actions to be executed for a hook.
*
* @param $hook
* The name of the hook being fired.
*
* @return
* An array whose keys are action IDs that the user has associated with
* this trigger, and whose values are arrays containing the action type and
* label.
*/
function trigger_get_assigned_actions($hook) {
$actions = &drupal_static(__FUNCTION__, array());
if (!isset($actions[$hook])) {
$actions[$hook] = db_query("SELECT ta.aid, a.type, a.label FROM {trigger_assignments} ta LEFT JOIN {actions} a ON ta.aid = a.aid WHERE ta.hook = :hook ORDER BY ta.weight", array(
':hook' => $hook,
))->fetchAllAssoc('aid', PDO::FETCH_ASSOC);
}
return $actions[$hook];
}
Steps to reproduce:
I attempted an upgrade from 6.31 -> 7.27 and the upgrade froze during updating with an AJAX error.
An AJAX HTTP request terminated abnormally. Debugging information follows. Path: http://zorquatheimp.flameandshadow.net/update.php?op=selection&token=1RBXaqMJ01-sW
I6PdfXZL3cPD9UiSvwZpFgZ52BcIGU&id=80883&op=do Status Text: ResponseText: ReadyState: 4
I ended up having to strip ALL the code off the site, and re-upload all the files again. It didn't show any failures during the new upgrade process, so not sure what it is missing.
When checking/re-running update.php to be sure none were missed - it said that there were no files to update, and had this error below:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'label' in 'field list': SELECT aid, callback, label FROM {actions} WHERE parameters = ''; Array ( ) in actions_synchronize() (line 276 of /home7/CoreSite/public_html/SubDomain/includes/actions.inc).
Code from that line: (plus the 2 previous)
function actions_synchronize($delete_orphans = FALSE) {
$actions_in_code = actions_list(TRUE);
$actions_in_db = db_query("SELECT aid, callback, label FROM {actions} WHERE parameters = ''")->fetchAllAssoc('callback', PDO::FETCH_ASSOC);
Comments