Error adding block "Popular content".
Log Work
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'n.nid' in 'field list': SELECT n.nid AS nid, n.title AS title, u.uid AS uid, u.name AS name FROM {file_managed} f INNER JOIN {file_download_counter} c ON f.fid=s.fid INNER JOIN {users_field_data} u ON n.uid = u.uid WHERE (daycount <> :db_condition_placeholder_0) AND (n.status = :db_condition_placeholder_1) AND (n.default_langcode = :db_condition_placeholder_2) AND (u.default_langcode = :db_condition_placeholder_3) ORDER BY daycount DESC LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 [:db_condition_placeholder_3] => 1 ) in file_download_counter_title_list() (line 121 of /var/www/html/sites/default/modules/file_download/modules/file_download_counter/file_download_counter.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | before-log-message.png | 147.79 KB | renatog |
| #5 | after-result-ok.png | 82.26 KB | renatog |
| #5 | after.png | 74.53 KB | renatog |
| #5 | before-1.png | 17.78 KB | renatog |
| #3 | not_work_block-2884108-3.patch | 1.87 KB | rhormens |
Comments
Comment #2
rhormens commentedComment #3
rhormens commentedChange db_select.
Comment #4
renatog commentedIn review
Comment #5
renatog commentedHi people.
I applied the patch and works good for me. Please check the images:
After place block (without patch):

After apply patch:

Make sense because query try use "n.nid" but not exists table alias "n" in query.
Works fine for me.
+RTBC
Thank you very much @rhormens
Regards
Comment #7
NewZeal commentedPushed to dev. If no problems then will deploy to beta4 shortly.
Comment #8
renatog commentedPerfect @new-zeal.
Thank you very much.
Can you update issue status for "Fixed", please?
Good Work and Good Week.
Regards.
Comment #9
NewZeal commentedFixed and in 8.x-1.0-beta4