Project

General

Profile

Actions

Bug #76677

closed

Pasting HTML with image fails in RTE if no default upload folder can be found

Added by Jigal van Hemert almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2016-06-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If an editor pastes some HTML which contains an externally hosted image in an RTE field the HTML parser tries to download the image and store it in FAL.

\TYPO3\CMS\Core\Html\RteHtmlParser::TS_images_db()

It tries to store it in the default upload folder of the BE user and uses
$folder = $GLOBALS['BE_USER']->getDefaultUploadFolder($this->recPid, $table, $field);

to retrieve the folder object. This function may return false if no upload folder can be found.

The code fails to check for this condition and tries to create a file anyway, which results in a fatal error calling a function on a non-object.

$fileObject = $folder->createFile($fileName)->setContents($externalFile);


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #75888: RTE - TYPO3 throws an error trying to edit images from external resources.Closed2016-04-23

Actions
Related to TYPO3 Core - Bug #72944: Behaviour dontFetchExtPictures optionClosed2016-01-26

Actions
Actions

Also available in: Atom PDF