Bug #48219
closedFile upload in RTE-Link-Editor throws 500 error page
100%
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
Updated by B. Kausch over 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...
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
Do you have eventually an error in the php/apache error log?
Updated by B. Kausch over 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.
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
Updated by Gerrit Code Review over 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
Updated by Philipp Gampe over 11 years ago
- Assignee set to Philipp Gampe
- PHP Version set to 5.4
- Complexity set to easy
I added a unit test.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Philipp Gampe over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1db576a52589a1006224a83170cf7b3b2476927a.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed