Bug #54394
Editing templavoila Template Objects not working
Status: | Resolved | Start date: | 2013-12-13 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Backend API | Spent time: | - | |
Target version: | next-patchlevel | Estimated time: | 0.10 hour | |
TYPO3 Version: | 6.1 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: | no-brainer |
Description
You can not edit templavoila Template Object if his preview icon is missing!
Related issues
Associated revisions
[BUGFIX] Exception if thumbnail does not exist
BackendUtility::thumbCode() tries to retrieve the extension
of a file object that might be NULL.
Add a check for having a valid file object.
Resolves: #54394
Releases: 6.1
Change-Id: Ia97fbb5fd3d9bd53c0d776a93969f9d059eebc4a
Reviewed-on: https://review.typo3.org/26446
Reviewed-by: Oliver Klee
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Klein
Tested-by: Markus Klein
History
#1 Updated by Dragan Tomic over 1 year ago
You can not edit templavoila Template Object if his preview icon is missing!
Bug is in TYPO3\CMS\Backend\Utility\BackendUtility -> thumbCode() method.
In this part, if you don't get a file (file is missing) next line is trying to read File extension and throws an error!
$fileName = trim($uploaddir . '/' . $theFile, '/');
$fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileName);//if file is missing fileObject is empty
$fileExtension = $fileObject->getExtension(); // and this throws exception
Just need to double check if $fileObject is empty and then go further.
if($fileObject) {
$fileExtension = $fileObject->getExtension();
.......
}
Bug found in versions: 6.1.4-dev and 6.1.5
#2 Updated by Markus Klein over 1 year ago
- Category changed from Backend User Interface to Backend API
- Target version set to next-patchlevel
This is fixed in 6.2, but definitely missing in 6.1!
#3 Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26446
#4 Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26446
#5 Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26446
#6 Updated by Markus Klein over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2b5c50e34b6fea3910964ed873a5fcc7c175841c.