Closed catorghans closed 1 year ago
This makes it work:
$count = db_query("SELECT count(entity_id) FROM {".$table."}")->fetchField();
Ah, PHP is probably treating it as a variable variable, which is why it isn't working: https://www.php.net/manual/en/language.variables.variable.php
Thanks for the report, and the resolution!
admin/reports/backdrop-upgrade gives an error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '.field_data_comment_body' doesn't exist:: SELECT count(entity_id) FROM field_data_comment_body; Array ( ) in field_backdrop_upgrade_status_report() (line 66 van /sites/all/modules/backdrop_upgrade_status/includes/backdrop_upgrade_status.field.inc).
Which makes sense, because that table contains a prefix in the database. I looked a the code, it contains "FROM {$table}" I guess that should work, but it doesn't.
admin/reports/updates/backdrop-upgrade also does not work, it can not fetch the update-data. Could be the same issue, but I could not find more details about why it could not fetch them