Bug #54804

Flexform - Link Bug

Added by Tobias Pierschel over 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2014-01-07
Due date:
% Done:

0%

TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi,

i configured a flexform element. Everything works fine, except for links.

            <test>
                <TCEforms>
                    <exclude>1</exclude>
                    <label>Link</label>
                    <config>
                        <type>input</type>
                        <eval>trim</eval>
                        <size>60</size>
                        <default></default>
                        <wizards type="array">
                            <_PADDING type="integer">2</_PADDING>
                            <link type="array">
                            <type>popup</type>
                            <title>Link</title>
                            <icon>link_popup.gif</icon>
                            <script>
                            browse_links.php?mode = wizard
                            </script>
                            <JSopenParams>height=500,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
                            </link>
                        </wizards>
                    </config>
                </TCEforms>
            </test>

The field is displayed. When I click on the linkthe "pop-up" window apears with the message "Request-URI Too Large".
I thought at first this could be the error "http://forge.typo3.org/issues/34420".

I invested a little bit and found that the link contains a lot of "20%" signs.

http://netinventors.de/typo3/browse_links.php?mode=wizard&P[fieldConfig][type]=input&P[fieldConfig][eval]=trim&P[fieldConfig][size]=60&P[fieldConfig][default]=&P[fieldConfig][wizards][_PADDING]=2&P[fieldConfig][wizards][link][type]=popup&P[fieldConfig][wizards][link][title]=Link&P[fieldConfig][wizards][link][icon]=link_popup.gif&P[fieldConfig][wizards][link][script]=browse_links.php%3Fmode%3Dwizard&P[fieldConfig][wizards][link][JSopenParams]=height%3D500%2Cwidth%3D500%2Cstatus%3D0%2Cmenubar%3D0%2Cscrollbars%3D1&P[fieldConfig][form_type]=input&P[fieldConfig][ds][*,gridelements_pi1]=%3CT3DataStructure%3E%0A%20%20%20%20%3Cmeta%3E%0A%20%20%20%20%20%20%20%20%3ClangDisable%3E1%3C%2FlangDisable%3E%0A%20%20%20%20%3C%2Fmeta%3E%0A%20%20%20%20%3CROOT%20type%3D%22array%22%3E%0A%20%20%20%20%20%20%20%20%3Ctype%3Earray%3C%2Ftype%3E%0A%20%20%20%20%20%20%20%20%3Cel%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20 and so on

I've found that the complete flexform is transmitted in the link. Is this a wanted behavoir?

My workarround is to clean up the flexform xml file and write the hole file in one line.

History

#1 Updated by Jo Hasenau over 5 years ago

  • Category set to General Bugs
  • Priority changed from Must have to -- undefined --

This is a problem with the TYPO3 core method generating the forms, that we can not fix within Gridelements.

The core says in \TYPO3\CMS\Backend\Form\FormEngine::renderWizards

// Including the full fieldConfig from TCA may produce too long an URL
if ($wid != 'RTE') {
  $params['fieldConfig'] = $fieldConfig;
}

So any field except from RTE fields will get the problem, including the pi_flexform field.

#2 Updated by Jo Hasenau over 5 years ago

  • Project changed from Grid Elements (former official tracker) - now moved to Gitlab! to TYPO3 Core
  • Category deleted (General Bugs)

#3 Updated by Jo Hasenau over 5 years ago

  • Target version set to next-patchlevel

#4 Updated by Mathias Schreiber over 4 years ago

  • Category set to FormEngine aka TCEforms
  • Priority changed from -- undefined -- to Should have
  • Target version changed from next-patchlevel to 7.4 (Backend)
  • Is Regression set to No

#5 Updated by Susanne Moog about 4 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#6 Updated by Marc Bauer almost 4 years ago

Hi I've found a working solution for these Bug:

\TYPO3\CMS\Backend\Form\Element\InputElement::render

Line 235-241:

                if($fieldName == 'pi_flexform') {
            $paramObj = $parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
            $rowId = $row['uid'];
            $searchMask = "/data\[tt_content\]\[$rowId\]\[pi_flexform]/";
            $paramObjReplace =  preg_replace($searchMask, $parameterArray['itemFormElName'], $paramObj);
            $parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = $paramObjReplace;
        }

I know it isn't the best solution but it works!

#7 Updated by Benni Mack almost 4 years ago

  • Target version changed from 7.5 to 7 LTS

#8 Updated by Wouter Wolters almost 4 years ago

  • Status changed from New to Needs Feedback

Please retest this against current master if possible. fieldConfig is not part of the link anymore.

#9 Updated by Alexander Opitz over 3 years ago

  • Status changed from Needs Feedback to Closed
  • Target version deleted (7 LTS)

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF