Bug #39859
No thumbnail if removing file extension from title
| Status: | Resolved | Start date: | 2012-08-16 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | File Abstraction Layer (FAL) | |||
| Target version: | - | |||
| TYPO3 Version: | 6.0 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 2 (View) |
Description
Thumbnails are not shown if file extension is removed from Title field.
Affected: page module and element browser. Screenshots added...
Related issues
| related to Core - Bug #39884: Cannot reference to a file after changing it's title | Resolved | 2012-08-17 | ||
| related to Core - Bug #36795: Changing the "title" of a file breaks some functionality | Resolved | 2012-05-03 |
Associated revisions
[BUGFIX] Changing file title changes file name
The TCA configuration of sys_file allows direct editing of the file
name. As t3lib_TCEmain does not recognize this change as a
filesystem-related change on saving, the file is not renamed on disk.
Instead, the index record is changed, so the file is not recognized
anymore, leading to a reindexing. Because of this, all references to the
old record seem to break.
This commit makes the name field read-only and adds the title field
(which is not present in the TCA at all currently).
Change-Id: Ice110fa7ea0cc335f8b9fa8a57ecc9fe7527de76
Resolves: #39884
Resolves: #36795
Resolves: #39859
Releases: 6.0
Reviewed-on: http://review.typo3.org/14260
Reviewed-by: Mario Rimann
Tested-by: Mario Rimann
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
History
Updated by Alexander Opitz 9 months ago
I can confirm this problem.
Updated by Alexander Opitz 9 months ago
I traced this problem down to an API problem inside the API.
TYPO3\CMS\Core\Resource\AbstractFile->name: Name of this file.
TYPO3\CMS\Core\Resource\File->__construct($fileData) $fileData: Array of the sys_file DB entry.
$fileData['name']: Value of the table field "name" in "sys_file" table.
But this field is the title field.
TYPO3\CMS\Core\Resource\AbstractFile->getExtension() does a pathinfo to the property "name" to get the extension, which already lies in the property "properties" of AbstractFile. And why lowercase it?
TYPO3\CMS\Core\Resource\Driver\LocalDriver->extractFileInformation() This function again uses the fileName of the file for the "name" property of the AbstractFile and not the one from the Storage. TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterFileList() asks the Driver and not the Storage?
I didn't read any FAL design, as there is nothing in the wiki, but this looks a bit like a problem inside the API.
Updated by Andreas Wolf 9 months ago
- Project changed from File Abstraction Layer to Core
Updated by Andreas Wolf 9 months ago
- Category set to File Abstraction Layer (FAL)
- TYPO3 Version set to 6.0
Updated by Andreas Wolf 9 months ago
- Status changed from New to Accepted
Updated by Andreas Wolf 9 months ago
Updated by Andreas Wolf 9 months ago
- Status changed from Accepted to Under Review
Updated by Gerrit Code Review 9 months ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14260
Updated by Gerrit Code Review 9 months ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14260
Updated by Anonymous 9 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d4f101a0bbf55e4c7fd1fe40d4eb0723068d100a.