Project

General

Profile

Actions

Bug #46187

closed

Missing columns sys_file.fileinfo and sys_file_meta.fileinfo

Added by Marc Bastian Heinrichs over 11 years ago. Updated over 5 years ago.

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

0%

Estimated time:
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.


Files

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

Related issues 1 (0 open1 closed)

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

Actions
Actions #1

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!

Actions #2

Updated by Marc Bastian Heinrichs over 11 years ago

Hey, sure.

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

Actions #3

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

Actions #4

Updated by Ernesto Baschny over 11 years ago

  • Status changed from Needs Feedback to Accepted
Actions #5

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.

Actions #6

Updated by Stefano Kowalke over 10 years ago

Is there any solution yet?

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Ingo Schmitt over 10 years ago

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

Updated by Marc Bastian Heinrichs about 10 years ago

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

Updated by Marc Bastian Heinrichs about 10 years ago

  • Target version set to next-patchlevel
Actions #13

Updated by Helmut Hummel almost 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)

Actions #14

Updated by Stephan Großberndt over 9 years ago

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

Actions #15

Updated by Georg Ringer over 9 years ago

  • Status changed from Under Review to Resolved

resolved with #63273

Actions #16

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #17

Updated by Sybille Peters almost 4 years ago

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

Also available in: Atom PDF