Bug #23299
closedIt is impossible to set links to files any more with the link wizard
Added by Helmut Hummel over 14 years ago. Updated almost 13 years ago.
0%
Description
If you have a field configured to have a link wizard, it's impossible to set file links any more.
When the wizard is closed, the filename is correctly tranferred into the input field, but the checkbox is not checked.
Steps to reproduce:
Try to set up a link to a file for the header of a tt_content element
(issue imported from #M15282)
Files
0015282_41.patch (530 Bytes) 0015282_41.patch | Administrator Admin, 2010-07-30 16:29 | ||
0015282_42_trunk.patch (671 Bytes) 0015282_42_trunk.patch | Administrator Admin, 2010-07-30 16:29 | ||
0015282_v2_42.patch (3.64 KB) 0015282_v2_42.patch | Administrator Admin, 2010-08-05 16:01 | ||
0015282_v2_43-trunk.patch (3.64 KB) 0015282_v2_43-trunk.patch | Administrator Admin, 2010-08-05 16:01 |
Updated by Lukas Rüegg over 14 years ago
It appears that the security fix "areFieldChangeFunctionsValid" in class.browse_links.php fails in the Link browser: As soon as you click a folder in the link brwoser $this->P['fieldChangeFuncHash'] is lost and areFieldChangeFunctionsValid returns false.
IMO this bug is critical as it effectivly breaks the backend
Updated by Jochen Rieger over 14 years ago
Same here... also if you don't have a checkbox.
When selecting a file via link wizard, the path will be transferred to the input field and some space bar input is added.
If you click into the input field, remove the spaces (trim it) and save, it will be saved. If you don't the field will be completely empty after saving and reloading the form.
Really a critical one.
Updated by Oliver Hader over 14 years ago
I can confirm this behaviour, seems like it was introduced with issue #15263.
Updated by Oliver Hader over 14 years ago
This problem occurs when opening the element browser and changing the tab to e.g. "file". Since the fieldChangeFunc array might get modified inside the element browser, the hash (which is only generated once in t3lib_TCEforms) won't match anymore - thus for security reasons no JavaScript functions will be executed anymore.
The attached patches are- 0015282_41.patch for TYPO3_4-1
- 0015282_42_trunk.patch for TYPO3_4-2, TYPO3_4-3, TYPO3_4-4, Trunk
Updated by Jochen Rieger over 14 years ago
Works for me in 4.2.13.
Thanks Oliver for your good and especially fast work!!!
Updated by Jonathan IROULIN over 14 years ago
The patch 0015282_42_trunk.patch works for me also in 4.2.13.
Thanks a lot Olivier for your work.
Updated by Chris topher over 14 years ago
Hi guys,
please post your responses to the thread in Core List!
See http://typo3.org/teams/core/core-mailinglist-rules/
If the patch worked for you, it is enough to just post "+1 on reading/testing" depending on if you read the patch file or if you also tested it!
Thanks for your votes in advance!
Updated by Jochen Rieger over 14 years ago
I found a situation where the patch doesn't work for me (4.2.13):
Using TemplaVoila FCE link field with wizard, 3 spaces are added, after saving the link is gone.
Same applies to FlexForms Fields with link wizard.
Updated by Oliver Hader over 14 years ago
Jochen, which wizard are you using? Does the patch for you for regular links where no TV is involved?
Updated by Jochen Rieger over 14 years ago
Oliver, it works perfectly fine in tt_contents bodytext field when using the rte link wizard.
Whereas the TV Link Wizard will fail in case you switch the tabs (eg from pages to files) in the wizard popup. The new value then won't be saved after saving the record.
Same behaviour in flexform fields with link wizard (eg tt_news template selector).
So, it seems to be a problem in the flexform evaluation... maybe!?
Updated by Jan Simbera over 14 years ago
Tested on 4.3.4 in own plugin which uses the link_wizard and worked. +1
Updated by Jochen Rieger over 14 years ago
Jan, did you test it in a flexform field or normal tca driven database field?
Updated by Oliver Hader over 14 years ago
I can confirm that there are problems with Flexform sections (the following text was copied from my post to the TYPO3 core mailing list):
Flexform section are duplicated with plain JavaScript, the HTML code for
that is already prerendered and will just be inserted again (with some
replacements to IDs). Thus, there is no call to the backend with AJAX as
we know it from IRRE - it just happens in the browser.
Thus, the calculated hash does not match anymore and the field change
functions are invalid.
Updated by Oliver Hader over 14 years ago
The attached v2 patches apply for TYPO3_4-2 to Trunk and also solve the Flexform section issue. Please test as much as possible.
Updated by Felix Griesser over 14 years ago
0015282_v2_43-trunk.patch: +1 (reading/testing) on 4.4.1 (two installations).
TCA (normal CE) and flexform (eg TV Template file) works for me!
Thanks Oliver for fast patching it!
Updated by Oliver Hader over 14 years ago
- TYPO3_4-1 (rev. 8490)
- TYPO3_4-2 (rev. 8491)
- TYPO3_4-3 (rev. 8492)
- TYPO3_4-4 (rev. 8493)
- Trunk (rev. 8494)
Updated by stefan schreck almost 13 years ago
Typo3 4.6.1
Happens to me again with a custom TAB inserted in the link wizard with extension linkhandler
as soon as I change the TAB insert cal link I get 4 spaces at the end. saving it. the link is gone.
It appears that the security fix "areFieldChangeFunctionsValid" in class.browse_links.php fails in the Link browser: As soon as you click a folder in the link brwoser $this->P['fieldChangeFuncHash'] is lost and areFieldChangeFunctionsValid returns false.