Feature #34420

Wizard makes too long URI

Added by anybody no-lastname-given about 7 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2012-02-29
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

Creating a page content of the type "form" the use of the button "form" -> "Form wizard" produces only the failure message "Request URI is too long".
Links to wizards send quite some data in the query parameters. Compressing this would shorten the URI to a length which is less likely to cause problems with certain IE browsers and web servers with limited URI lengths.


Related issues

Related to AOE linkhandler - Bug #5034: URL length of tab links causes errors in IE7 Resolved 2009-10-19
Duplicated by TYPO3 Core - Bug #42556: Wizards popups often close directly on IE Rejected 2012-10-31
Duplicated by TYPO3 Core - Bug #70814: be_groups-record: Create new filemount calls an overly long URI Closed 2015-10-17

Associated revisions

Revision 436d0e74 (diff)
Added by Thomas Maroschik over 3 years ago

[CLEANUP] Remove unused GET parameter fieldConfig for wizards

Many wizard links contain a lot of parameters for legacy reasons.
We can dramatically shorten those in many cases by removing
fieldConfig from them. After searching for fieldConfig throughout
the core it doesn't look like the parameter is used at all.

This patch removes the parameter from link generation.

Resolves: #34420
Releases: master
Change-Id: Ica7e5aff1d4834b95e550b7170b27550fad955f6
Reviewed-on: https://review.typo3.org/44413
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>

History

#1 Updated by Jigal van Hemert about 7 years ago

  • Status changed from New to Needs Feedback

Which browser (and version) do you use? What kind of server software (Apache?, other?, version?) Is there a limitation on the URL length set in the server?
I just tried it and got this URL:

http://localhost/typo3/sysext/form/Classes/Controller/Wizard.php?&P[fieldConfig][type]=text&P[fieldConfig][cols]=48&P[fieldConfig][rows]=5&P[fieldConfig][wizards][_PADDING]=4&P[fieldConfig][wizards][_VALIGN]=middle&P[fieldConfig][wizards][RTE][notNewRecords]=1&P[fieldConfig][wizards][RTE][RTEonly]=1&P[fieldConfig][wizards][RTE][type]=script&P[fieldConfig][wizards][RTE][title]=LLL%3AEXT%3Acms%2Flocallang_ttc.xml%3Abodytext.W.RTE&P[fieldConfig][wizards][RTE][icon]=wizard_rte2.gif&P[fieldConfig][wizards][RTE][script]=wizard_rte.php&P[fieldConfig][wizards][table][notNewRecords]=1&P[fieldConfig][wizards][table][enableByTypeConfig]=1&P[fieldConfig][wizards][table][type]=script&P[fieldConfig][wizards][table][title]=LLL%3AEXT%3Acms%2Flocallang_ttc.xml%3Abodytext.W.table&P[fieldConfig][wizards][table][icon]=wizard_table.gif&P[fieldConfig][wizards][table][script]=wizard_table.php&P[fieldConfig][wizards][table][params][xmlOutput]=0&P[fieldConfig][wizards][forms][notNewRecords]=1&P[fieldConfig][wizards][forms][enableByTypeConfig]=1&P[fieldConfig][wizards][forms][type]=script&P[fieldConfig][wizards][forms][title]=Form%20wizard&P[fieldConfig][wizards][forms][icon]=wizard_forms.gif&P[fieldConfig][wizards][forms][script]=sysext%2Fform%2FClasses%2FController%2FWizard.php&P[fieldConfig][wizards][forms][params][xmlOutput]=0&P[fieldConfig][wizards][t3editor][enableByTypeConfig]=1&P[fieldConfig][wizards][t3editor][type]=userFunc&P[fieldConfig][wizards][t3editor][userFunc]=EXT%3At3editor%2Fclasses%2Fclass.tx_t3editor_tceforms_wizard.php%3Atx_t3editor_tceforms_wizard-%3Emain&P[fieldConfig][wizards][t3editor][title]=t3editor&P[fieldConfig][wizards][t3editor][icon]=wizard_table.gif&P[fieldConfig][wizards][t3editor][script]=wizard_table.php&P[fieldConfig][wizards][t3editor][params][format]=html&P[fieldConfig][softref]=typolink_tag%2Cimages%2Cemail%5Bsubst%5D%2Curl&P[fieldConfig][search][andWhere]=CType%3D%27text%27%20OR%20CType%3D%27textpic%27&P[fieldConfig][form_type]=text&P[params][xmlOutput]=0&P[exampleImg]=&P[table]=tt_content&P[uid]=180&P[pid]=40&P[field]=bodytext&P[flexFormPath]=&P[md5ID]=ID75db926593&P[returnUrl]=%2Ftypo3%2Falt_doc.php%3F%26returnUrl%3D%252Ftypo3conf%252Fext%252Ftemplavoila%252Fmod1%252Findex.php%253Fid%253D40%26edit%5Btt_content%5D%5B180%5D%3Dedit

This is even longer, but no error about the length.

#2 Updated by anybody no-lastname-given about 7 years ago

Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.3.5 mod_ssl/2.2.9 OpenSSL/0.9.8g. With the phpinfo of the install tool I could not find a limit, but I am not very experienced with php.

I tried with Firefox 10.0.2 and IE 9.0.8112.

#3 Updated by Jigal van Hemert about 7 years ago

There are two settings in the Apache configuration which can cause this error message: LimitRequestFieldSize and LimitRequestLine. Maybe your hoster has decreased the limit? The standard value is 8190 bytes.

In IE7 there was also a limit [2], but since we both tested with FF 10.0.2 it is very unlikely that this is the problem.

Can you check with the hoster / sysadmin?

[1] http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize
[2] http://support.microsoft.com/kb/208427

#4 Updated by anybody no-lastname-given about 7 years ago

According to my provider there was a limit, which is now changed.

But it would be helpful to insert a hint in the FAQ and very optimal to change the programming to shorter links.

SOLVED

#5 Updated by Jigal van Hemert about 7 years ago

  • Category changed from Form Framework to Backend API
  • Status changed from Needs Feedback to Accepted
  • Priority changed from -- undefined -- to Could have
  • Complexity set to medium

I'm changing this in a feature request for compressing long wizard URLs. Some quick tests revealed the using deflate + base64 decreased the size to less than 40%. The parameters in my example took 2221 characters and after compressing "just" 872.

#6 Updated by Jigal van Hemert about 7 years ago

  • Tracker changed from Bug to Feature

#7 Updated by Jigal van Hemert about 7 years ago

  • Subject changed from Form Wizard makes too long URI to Wizard makes too long URI

#8 Updated by Sven Juergens over 6 years ago

Today i had the same Problem with an own wizard, is there maybe a "quick and dirty" patch @Jigal van Hemert ? Or maybe a hint where and how i can use "deflate + base64" ?

#9 Updated by Alexander Wende over 6 years ago

Same problem here. Using IIS 7.5 on Windows 2008 RC2. Table and forms wizard links doesn't work. Is there any workaround?

#10 Updated by Marco Bresch over 6 years ago

All older IE's (<= 8) has the same problem. See "Maximum URL length is 2,083 characters in Internet Explorer", http://support.microsoft.com/kb/208427/en

#11 Updated by sunixzs no-lastname-given over 5 years ago

HI,

a quick & dirty solution could be, if the array-key of the wizzard-config is "RTE" and not "link". Then the param "fieldConfig" is not set:

Example TCA-part of the wizzard:

<wizards>
    <_PADDING>2</_PADDING>
    <RTE><!-- not "link" -->
        <type>popup</type>
        <title>Icon</title>
        <icon>i/tt_content_search.gif</icon>
        <script>browse_links.php?mode=FontAwesome</script>
        <JSopenParams>height=500,width=750,status=0,menubar=0,scrollbars=1</JSopenParams>
    </RTE>
</wizards>

Typo3 6.1.6 \TYPO3\CMS\Backend\Form\FormEngine Line 3983

if ($wid != 'RTE') {
    $params['fieldConfig'] = $fieldConfig;
}

URL before: 9485 characters
URL after: 1117 characters

#12 Updated by Tobias Pierschel over 5 years ago

We ran often in this anoying issue and its a real show stopper. Could there be a fix soon? We would pay 100 EUR for fixing that problem.

#13 Updated by Christof Hagedorn over 5 years ago

Could someone provide the lowest reasonable values and for typo3 necessary values for

LimitRequestLine
LimitRequestFields
LimitRequestFieldsize
LimitRequestBody

in the apache config?

#14 Updated by Alex Kellner almost 5 years ago

Still exists in TYPO3 6.2.
One of the reasons why powermail has no edit link in FlexForm :(

#15 Updated by Jens Vollmer about 4 years ago

This one drove me nuts. It's more a very dirty hack than a real solution, but setting $params['fieldConfig'] to empty worked for me in my Extension and TYPO3 6.2 for the edit wizard. The wizard has to be configured with "module" instead of "script" in TCA.

FormEngine.php

if ((string) $wConf['type'] == 'popup' && $wConf['module']['name'] == 'wizard_edit') {
    $params['fieldConfig'] = '';
    unset($params['exampleImg']);
}

#16 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Accepted to Under Review

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

#17 Updated by Gerrit Code Review over 3 years ago

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

#18 Updated by Gerrit Code Review over 3 years ago

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

#19 Updated by Thomas Maroschik over 3 years ago

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

#20 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF