Hi, just installed this module which seems to be doing exactly what I need however I was getting this error each time I was trying to download a private file :
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atout.file_managed' doesn't exist: SELECT fid as fid from file_managed fm WHERE fm.uri = :uri; Array ( [:uri] => private://path_to_file.pdf ) in file_download_tracker_file_download() (line 56 of modules/file_download_tracker/file_download_tracker.module).
This is a major issue since it breaks the site.
I figured that there is a problem in the way the query @ line 56 of file_download_tracker.module is written since it is considering the table name as "file_managed" and does not check if drupal database is configured with a table prefix. "atout_" in my case.
I am new to drupal 8 so not sure what is the correct way to write the query to avoid this issue but I fixed it by adding my table prefix in the code.
I guess it is not a big thing to fix it, let me know if my explanation is not clear.
Thanks for the great work on this module!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | file_managed_not_found-2857804-4.patch | 505 bytes | dishabhadra |
Comments
Comment #2
jegaudin commentedComment #3
dishabhadra commentedComment #4
dishabhadra commentedHi,
I solved the issue by making the changes to the table name.
You can check the attached patch.
Review my patch.