Project

General

Profile

Actions

Bug #48219

closed

File upload in RTE-Link-Editor throws 500 error page

Added by B. Kausch almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2013-05-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When you want to add a link in the RTE-Editor, you can upload files in the "File" tab. When you select a file and want to upload it, the reloaded content in the create-link-overlay will throw an error (see picture):

Oops, an error occurred!

Folder Keiner. Neuen Link setzen! does not exist.

More information regarding this error might be available online

Typo3 throws this 500 error while requesting this link: [...]typo3/sysext/rtehtmlarea/mod3/browse_links.php?act=file&mode=rte&expandFolder=1%3A%2Fuser_upload%2F&bparams=%7Cdata_tt_content__8__bodytext_%3Ade%3Autf-8%7Ctt_content%3A8%3Abodytext%3A9%3Atextpic%3A9%3A

The file upload is successful though... from the side of the editor this is an absolute no-go!


Files

error.jpg (77.6 KB) error.jpg B. Kausch, 2013-05-15 15:00
Actions #1

Updated by B. Kausch almost 11 years ago

The problem resides in the printCurrentUrl method in the class TYPO3\CMS\Recordlist\Browser\ElementBrowser. It seems to me that the condition at line 1943 should be:

if ($str && is_numeric($str) && $this->act 'file' || $this->act 'folder')

But I could be wrong...

Actions #2

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback

Do you have eventually an error in the php/apache error log?

Actions #3

Updated by B. Kausch almost 11 years ago

I'm sorry, but nothing is written in the error log for this particular error.

But I can pretty much reconstruct the whole error process (involved classes: TYPO3\CMS\Rtehtmlarea\BrowseLinks, which extends TYPO3\CMS\Recordlist\Browser\ElementBrowser):

(1) you send the form with the files you want to upload, initializing the init method of BrowseLinks. It looks for the curUrlArray in the post parameters, but non is sent. So the parseCurUrl method of ElementBrowser gives back following curUrlInfo array:

array(3) {
["info"]=> string(26) "Keiner. Neuen Link setzen!"
["value"]=> string(0) ""
["act"]=> string(4) "page"
}

(2) then in the main_rte method of BrowseLinks the printCurrentUrl method of ElementBrowser is called with the language string of curUrlInfo['info'], which is the local translation for none: "Keiner. Neuen Link setzen!"

(3) the printCurrentUrl method of ElementBrowser feeds that string at line 1945 to the retrieveFileOrFolderObject method of your ResourceFactory. Of course no file for that string (it is a translated message!) is found, throwing an exception.

That's it.

Actions #4

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #6

Updated by Philipp Gampe almost 11 years ago

  • Assignee set to Philipp Gampe
  • PHP Version set to 5.4
  • Complexity set to easy

I added a unit test.

Actions #7

Updated by Gerrit Code Review almost 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #8

Updated by Gerrit Code Review almost 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #9

Updated by Gerrit Code Review almost 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #10

Updated by Gerrit Code Review almost 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #11

Updated by Gerrit Code Review almost 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20850

Actions #12

Updated by Philipp Gampe almost 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF