In includes/backdrop_upgrade_status.field.inc there is a count of the field data run against the fielddata table for a field.
I ran into a situation where the node_display_fields module was in use. That module doesn't create a fielddata table for it's fields so running the backdrop upgrade overview report throws a fatal error that the table doesn't exist.
We could wrap it in a check for the table maybe like so?
// Add the item count.
$table = 'field_data_' . $field_name;
if (db_table_exists($table)) {
$count = db_query("SELECT count(entity_id) FROM {$table}")->fetchField();
$rows[$field_name]['data']['count'] = $count;
$rows[$field_name]['data']['recommendation'] = '';
if ($count == 0) {
$rows[$field_name]['class'] = array('warning');
$rows[$field_name]['data']['recommendation'] = t('Delete this field?');
}
}
In includes/backdrop_upgrade_status.field.inc there is a count of the field data run against the fielddata table for a field.
I ran into a situation where the node_display_fields module was in use. That module doesn't create a fielddata table for it's fields so running the backdrop upgrade overview report throws a fatal error that the table doesn't exist.
We could wrap it in a check for the table maybe like so?