Bug #50437
closedFilebrowser popup window has javascript error and stops working
100%
Description
When trying to add an image to textpic I do the following:
Navigate to the desired folder holding my images.
The list of images is generated.
Clicking "Show thumbnails".
Realizing I am in the wrong folder -> trying to click on another folder.....
Filebrowser popup window has javascript error and stops working.....
Firebug gives me: "ReferenceError: jumpToUrl is not defined":
Files
Updated by Eric Chavaillaz over 11 years ago
I confirm this bug. And it's the same with file etc.
Updated by Ernesto Baschny over 11 years ago
I can confirm that. The error that leads to that comes before and is:
Uncaught SyntaxError: Unexpected identifier browse_links.php?&id=&act=page&mode=file&expandFolder=1%3A%2FImages%2FAdmin…heckUniqueElement%7C%7Cinline.importElement[object%20HTMLInputElement]:277
On that line (277) we have:
parent.window.opener.inline.importElement("data-57-tt_content-259-image-sys_file_reference",table,uid,type);
Updated by Eric Chavaillaz over 11 years ago
OK and how to fix that bug? Have you any idea?
Thanks
Updated by Benjamin Pick about 11 years ago
The exact url is:
/typo3/browse_links.php?&id=&act=page&mode=file&expandFolder=1%3A%2Fuser_upload%2Fmarken%2Fm%2F&bparams=%7C%7C%7Cgif%2Cjpg%2Cjpeg%2Ctif%2Ctiff%2Cbmp%2Cpcx%2Ctga%2Cpng%2Cpdf%2Cai%7Cdata-90-tt_content-1130-image-sys_file_reference%7Cinline.checkUniqueElement%7C%7Cinline.importElement&SET[displayThumbs]=0&bparams=%7C%7C%7Cgif%2Cjpg%2Cjpeg%2Ctif%2Ctiff%2Cbmp%2Cpcx%2Ctga%2Cpng%2Cpdf%2Cai%7Cdata-90-tt_content-1130-image-sys_file_reference%7Cinline.checkUniqueElement%7C%7Cinline.importElement[object%20HTMLInputElement]
which parses into:
SET[displayThumbs] 0 act page bparams |||gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai|data-90-tt_content-1130-image-sys_file_reference|inline.checkUniqueElement||inline.importElement bparams |||gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai|data-90-tt_content-1130-image-sys_file_reference|inline.checkUniqueElement||inline.importElement[object HTMLInputElement] expandFolder 1:/user_upload/marken/m/ id mode file
which is rather weird for 2 reasons: 1) normally the bparams GET parameter should only be used once, and 2) importElement is a function, not an object, so [object HTMLInputElement] doesn't make sense.
Updated by Benjamin Pick about 11 years ago
- File workaround_50437.patch workaround_50437.patch added
Workaround: In typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php:507
, add a type check:
var theLocation = URL + add_act + add_mode + add_href + add_target + add_class + add_title + add_params' . ($addPassOnParams ? '+"' . $addPassOnParams . '"' : '') . '+(typeof(anchor)=="string"?anchor:"");
The underlying issue is that throughout the Typo3 framework, different variations of jumpToUrl
are used: jumpToUrl(URL)
, jumpToUrl(URL,formEl)
as well as jumpToUrl(URL,anchor)
.
Updated by Gerrit Code Review about 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23889
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23889
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/24093
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/24094
Updated by Benjamin Pick about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 30af6a5121c1f4f4cb154d7e0dd65bbb7d0111a2.