Missing columns sys_file.fileinfo and sys_file_meta.fileinfo
Search via admin > DB-check
SQL Error: Unknown column 'sys_file.fileinfo' in 'where clause'
Since 6.2 also:
SQL Error: Unknown column 'sys_file_metadata.fileinfo' in 'where clause'
Sad, but true: all tca columns need a db column, also the ones having type user.
#1 Updated by Ernesto Baschny over 7 years ago
- Status changed from New to Needs Feedback
What query exactly are you making in the DB check? There is "Advanced query" and "Raw search in all fields". I can only get this kind of error if I explicitly select the "fileinfo" field in the "Advanced query" - which is rather normal.
If you could share your steps to reproduce, it would help identifying the exact bug.
#3 Updated by Ernesto Baschny over 7 years ago
I would rather consider this to be a bug in the DB-Search method, which blindly just adds all TCA columns fields to a "LIKE x" query, which is ugly anyway.
Since 4.5 (LiveSearch) we have the 'searchFields' TCA property, where tables can specify which fields can be "full-text-searched".
So in my views:
1) DB-Search should respect these settings for it's "fulltext search" (typo3/sysext/core/Classes/Database/QueryView.php)
2) we should add "searchFields" to the TCA for sys_file (typo3/sysext/core/Configuration/TCA/sys_file.php) - and maybe other core tables
#5 Updated by Marc Bastian Heinrichs over 7 years ago
Compared to the LiveSearch this search is a low level raw seach in ALL fields (like the name say).
As I remember this raw version was very very helpfull in some cases in the past and not for only "fulltext" searchable fields.
So I think this search should stay as a raw one, but, yes, you should be able to tell tca
that a column has no db representation. This could also be helpful for extbase in some cases.
#13 Updated by Helmut Hummel about 6 years ago
Stefano Kowalke wrote:
Is there any solution yet?
I think the correct solution would be to add a configuration option in TCA which makes states that no field exists in the database,
or skip including the field if it is of type 'user' or passthrough (in all code that uses tca column names to compile queries)