Project

General

Profile

Actions

Bug #25946

closed

BE typolink fields not saved [FCE]

Added by Vitoandre D'Oria over 13 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2011-04-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.1
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Hello folks,

i am not sure whetever this bug belongs to TV or the CORE self.

I've encountered the following problem when dealing with linkfields in the backend:

URL links entered using the "RTE link" window are not stored under the following conditions in FCE's:

1: Create a FCE
CO > SC > CO > EL=linkfield

2: Enter a Link
A newly created FCE or saved but no SC yet added.
Note: This bug also happens if there are already saved SC elements but only on newly added items.

Adding a URL under this conditions has the following result:
The URL has 3 trailing spaces when selecting a URL using the "RTE link" Window and the link won't be saved by TYPO3 when saving the FCE.
eg:

"1276   " 

This problem won't happen if the SC has been saved before.

From what i've seen the "RTE link" window returns this:
updateValueInMainForm(input) > input = input + " " + cur_target + " " + cur_class + " " + cur_title;

which explains the 3 spaces but under the above described conditions the replacement (fieldGet > fieldSet > evalFunc_dummy, TBE_EDITOR.fieldChanged) aren't firing and TYPO3 won't save this 3 whitespace link.

A sample of an unsaved Backend Field (non-working) looks like this:
<input type="text" onchange="typo3form.fieldGet('data[tt_content][3909][tx_templavoila_flex][data][sDEF][lDEF][field_sc_linklist][el][ID-1c1babd47b-idx1302697057499-form][field_co_linklist][el][field_sc_linklist][el][ID-1c1babd47b-idx1302697057499-197393bf73-d73537c9bd-idx1302697059545-form][field_one_col][el][field_one_col_link][vDEF]','trim','',1,'');TBE_EDITOR.fieldChanged('tt_content','3909','tx_templavoila_flex','data[tt_content][3909][tx_templavoila_flex]');" maxlength="256" style="width: 144px;" value="" name="data[tt_content][3909][tx_templavoila_flex][data][sDEF][lDEF][field_sc_linklist][el][ID-1c1babd47b-idx1302697057499-form][field_co_linklist][el][field_sc_linklist][el][ID-1c1babd47b-idx1302697057499-197393bf73-d73537c9bd-idx1302697059545-form][field_one_col][el][field_one_col_link][vDEF]_hr" class="formField2 tceforms-textfield tceforms-textfield tceforms-linkfield" id="tceforms-linkfield-4da5943015e7f">

A working Field (saved) like this:
<input type="text" onchange="typo3form.fieldGet('data[tt_content][3909][tx_templavoila_flex][data][sDEF][lDEF][field_sc_linklist][el][1][field_co_linklist][el][field_sc_linklist][el][1][field_one_col][el][field_one_col_link][vDEF]','trim','',1,'');TBE_EDITOR.fieldChanged('tt_content','3909','tx_templavoila_flex','data[tt_content][3909][tx_templavoila_flex]');" maxlength="256" style="width: 144px;" value="" name="data[tt_content][3909][tx_templavoila_flex][data][sDEF][lDEF][field_sc_linklist][el][1][field_co_linklist][el][field_sc_linklist][el][1][field_one_col][el][field_one_col_link][vDEF]_hr" class="formField2 tceforms-textfield tceforms-textfield tceforms-linkfield" id="tceforms-linkfield-4da5aea14f5c1">

Isn't it possible to fix this just by triming the URL's under all circumstances using PHP when saving the HTML Form!?
Right now all links entered are lost and the user has to re-enter it again.

The Problem happens on several boxes using TYPO3 4.4 - 4.5
Tested with TV 1.5.3/1.5.4
Using FF 3/4, IE8/9

hope someone can shed light upon this mystery :-)


Files

25946_class.browse_links.patch (908 Bytes) 25946_class.browse_links.patch Core Bug #25946 Patch for class.browse_links.php Version Typo3 4.5.16 Darren Clark, 2012-08-09 16:54
Actions #1

Updated by Oliver Hader over 13 years ago

  • Target version changed from 4.5.3 to 4.5.4
Actions #2

Updated by Oliver Hader about 13 years ago

  • Target version changed from 4.5.4 to 4.5.6
Actions #3

Updated by Andreas Wolf about 13 years ago

  • Status changed from New to Accepted
  • Complexity set to medium

Would you be able to dig further into this with some help from a Core Team member?

Actions #4

Updated by Chris topher about 13 years ago

  • Target version changed from 4.5.6 to 4.5.8
Actions #5

Updated by Ernesto Baschny almost 13 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #6

Updated by Darren Clark over 12 years ago

Issue replicated in Typo3 4.5.16 so that creating a new link within a container and saving this was lost on save and had the extra spaces.

Patch attached:

Added trailing slash cleanup on input.
Added call to onchange for the field.

After patching creating a new link element now saves correctly.

Actions #7

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/17949

Actions #8

Updated by Gerrit Code Review over 11 years ago

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

Actions #9

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19766

Actions #10

Updated by Gerrit Code Review almost 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19766

Actions #11

Updated by Gerrit Code Review almost 10 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35622

Actions #12

Updated by Wouter Wolters almost 10 years ago

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

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF