Bug #46187
closedMissing columns sys_file.fileinfo and sys_file_meta.fileinfo
0%
Description
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.
Files
Updated by Ernesto Baschny over 11 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.
Thanks!
Updated by Marc Bastian Heinrichs over 11 years ago
Hey, sure.
"Raw search in all fields" with enabled SYS sqlDebug. See screenshot
Updated by Ernesto Baschny over 11 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
Updated by Ernesto Baschny over 11 years ago
- Status changed from Needs Feedback to Accepted
Updated by Marc Bastian Heinrichs over 11 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.
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26783
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26783
Updated by Gerrit Code Review almost 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26783
Updated by Ingo Schmitt almost 11 years ago
- Category set to File Abstraction Layer (FAL)
- Is Regression set to No
Updated by Marc Bastian Heinrichs over 10 years ago
- Subject changed from Missing column sys_file.fileinfo to Missing columns sys_file.fileinfo and sys_file_meta.fileinfo
Updated by Marc Bastian Heinrichs over 10 years ago
- Target version set to next-patchlevel
Updated by Helmut Hummel over 10 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)
Updated by Stephan Großberndt about 10 years ago
I just encountered this bug. Is someone working on this?
Updated by Georg Ringer almost 10 years ago
- Status changed from Under Review to Resolved
resolved with #63273
Updated by Sybille Peters about 4 years ago
- Related to Bug #92312: sys_file_metadata.filelist is in TCA but not in SQL schema - may lead to exceptions added