Some users are getting the following error when attempting to access the media tab on the admin/content page:

Error
The website encountered an unexpected error. Please try again later.

The log is showing the following error (of Type php):

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'n.type' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {file_managed} f INNER JOIN {users} u ON f.uid = u.uid WHERE (f.status = :db_condition_placeholder_0) AND (f.uri NOT LIKE :db_condition_placeholder_1 ESCAPE '\\') AND( (n.type = :db_condition_placeholder_2) OR (n.type = :db_condition_placeholder_3) OR (n.type = :db_condition_placeholder_4) OR (n.type = :db_condition_placeholder_5) OR (n.type = :db_condition_placeholder_6) OR (n.type = :db_condition_placeholder_7) OR (n.type = :db_condition_placeholder_8) OR (n.type = :db_condition_placeholder_9) OR (n.type = :db_condition_placeholder_10) OR (n.type = :db_condition_placeholder_11) OR (n.type = :db_condition_placeholder_12) OR (n.type = :db_condition_placeholder_13) OR (n.type = :db_condition_placeholder_14) )) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => temporary% [:db_condition_placeholder_2] => dean_s_message_homepage_ [:db_condition_placeholder_3] => event [:db_condition_placeholder_4] => faculty_of_medicine_communicatio [:db_condition_placeholder_5] => gallery [:db_condition_placeholder_6] => major_priorities [:db_condition_placeholder_7] => medemail [:db_condition_placeholder_8] => news [:db_condition_placeholder_9] => page [:db_condition_placeholder_10] => photo [:db_condition_placeholder_11] => reports [:db_condition_placeholder_12] => stories [:db_condition_placeholder_13] => utoronto_medicine_magazine [:db_condition_placeholder_14] => video_2 ) in PagerDefault->execute() (line 74 of /var/www/medicine.utoronto.ca/includes/pager.inc).

Notes:

- Admin user doesn't experience this issue
- I'm checked permissions, the affected users have all media permissions enabled: 'Administer media', 'Import media files from the local filesystem', 'View media' and 'Edit media'. Not sure if other permissions could be causing the problem, but I suspect not given the exception that's being thrown (above).

Any help is most appreciated! Thanks in advance!

Comments

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

Based on that SQL query error, it sounds like you might have some kind of node access or control module that is improperly adding itself to the query for files. Can you please supply a list of modules and versions you have enabled? If you don't want to list them all, you can only list ones that are related to access control.

steinmb’s picture

Assigned: quanras » Unassigned
Status: Postponed (maintainer needs more info) » Closed (duplicate)