Project

General

Profile

Actions

Bug #23299

closed

It 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.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2010-07-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Related issues 5 (0 open5 closed)

Has duplicate TYPO3 Core - Bug #23297: Image link is not savedClosedChris topher2010-07-29

Actions
Has duplicate TYPO3 Core - Bug #23326: Setting external links on picturesClosedChris topher2010-08-01

Actions
Has duplicate TYPO3 Core - Bug #23333: Can not create an 'Image link' to a file in 'Text w/image'ClosedChris topher2010-08-02

Actions
Has duplicate TYPO3 Core - Bug #23349: Can not insert external link with link wizard on images etc.ClosedChris topher2010-08-04

Actions
Has duplicate TYPO3 Core - Bug #23345: Link Browser adding spaces to file path and not saving pathClosedJeff Segars2010-08-03

Actions
Actions #1

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

Actions #2

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.

Actions #3

Updated by Oliver Hader over 14 years ago

I can confirm this behaviour, seems like it was introduced with issue #15263.

Actions #4

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
Actions #5

Updated by Jochen Rieger over 14 years ago

Works for me in 4.2.13.

Thanks Oliver for your good and especially fast work!!!

Actions #6

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.

Actions #7

Updated by Lutz Wulfestieg over 14 years ago

+1 on reading/testing

Actions #8

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!

Actions #9

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.

Actions #10

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?

Actions #11

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!?

Actions #12

Updated by Jan Simbera over 14 years ago

Tested on 4.3.4 in own plugin which uses the link_wizard and worked. +1

Actions #13

Updated by Jochen Rieger over 14 years ago

Jan, did you test it in a flexform field or normal tca driven database field?

Actions #14

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.

Actions #15

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.

Actions #16

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!

Actions #17

Updated by Oliver Hader over 14 years ago

Committed to SVN:
  • TYPO3_4-1 (rev. 8490)
  • TYPO3_4-2 (rev. 8491)
  • TYPO3_4-3 (rev. 8492)
  • TYPO3_4-4 (rev. 8493)
  • Trunk (rev. 8494)
Actions #18

Updated by Ingo Renner over 14 years ago

released in
4.1.15
4.2.14
4.3.5
4.4.2

Actions #19

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.

Actions

Also available in: Atom PDF