Bug #46187

Missing columns sys_file.fileinfo and sys_file_meta.fileinfo

Added by Marc Bastian Heinrichs over 7 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-03-11
Due date:
% Done:

0%

TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

46187.png View (53.9 KB) Marc Bastian Heinrichs, 2013-03-15 09:58


Related issues

Related to TYPO3 Core - Bug #92312: sys_file_metadata.filelist is in TCA but not in SQL schema - may lead to exceptions New 2020-09-15

History

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

Thanks!

#2 Updated by Marc Bastian Heinrichs over 7 years ago

Hey, sure.

"Raw search in all fields" with enabled SYS sqlDebug. See screenshot

#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

#4 Updated by Ernesto Baschny over 7 years ago

  • Status changed from Needs Feedback to Accepted

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

#6 Updated by Stefano Kowalke over 6 years ago

Is there any solution yet?

#7 Updated by Gerrit Code Review over 6 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

#8 Updated by Gerrit Code Review over 6 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

#9 Updated by Gerrit Code Review over 6 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

#10 Updated by Ingo Schmitt over 6 years ago

  • Category set to File Abstraction Layer (FAL)
  • Is Regression set to No

#11 Updated by Marc Bastian Heinrichs over 6 years ago

  • Subject changed from Missing column sys_file.fileinfo to Missing columns sys_file.fileinfo and sys_file_meta.fileinfo

#12 Updated by Marc Bastian Heinrichs over 6 years ago

  • Target version set to next-patchlevel

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

#14 Updated by Stephan GroƟberndt almost 6 years ago

I just encountered this bug. Is someone working on this?

#15 Updated by Georg Ringer almost 6 years ago

  • Status changed from Under Review to Resolved

resolved with #63273

#16 Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed

#17 Updated by Sybille Peters 5 days ago

  • Related to Bug #92312: sys_file_metadata.filelist is in TCA but not in SQL schema - may lead to exceptions added

Also available in: Atom PDF