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).

Comments

rhormens created an issue. See original summary.

rhormens’s picture

Issue summary: View changes
rhormens’s picture

StatusFileSize
new1.87 KB

Change db_select.

renatog’s picture

Assigned: Unassigned » renatog
Status: Active » Needs review

In review

renatog’s picture

Assigned: renatog » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new17.78 KB
new74.53 KB
new82.26 KB
new147.79 KB

Hi 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

NewZeal’s picture

Pushed to dev. If no problems then will deploy to beta4 shortly.

renatog’s picture

Perfect @new-zeal.

Thank you very much.

Can you update issue status for "Fixed", please?

Good Work and Good Week.

Regards.

NewZeal’s picture

Status: Reviewed & tested by the community » Fixed

Fixed and in 8.x-1.0-beta4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.