[BUGFIX] Use POST instead of GET for suggest wizard 72/41972/2
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 27 Jul 2015 09:21:19 +0000 (11:21 +0200)
committerStefan Froemken <froemken@gmail.com>
Mon, 27 Jul 2015 10:41:59 +0000 (12:41 +0200)
The request for the suggest wizard must use POST instead of GET
to prevent too large request URI.

Resolves: #68518
Releases: master
Change-Id: Ie57cb803c7cf86988532bbc2e3cdf85151d8ec31
Reviewed-on: http://review.typo3.org/41972
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineSuggest.js

index 4cc6f22..0c253d9 100644 (file)
@@ -23,16 +23,20 @@ define('TYPO3/CMS/Backend/FormEngineSuggest', ['jquery', 'jquery/autocomplete'],
                        pid = $searchField.data('pid'),
                        newRecordRow = $searchField.data('recorddata'),
                        minimumCharacters = $searchField.data('minchars'),
-                       url = TYPO3.settings.ajaxUrls['t3lib_TCEforms_suggest::searchRecord']
-                                 + '&table=' + table
-                                 + '&field=' + field
-                                 + '&uid=' + uid
-                                 + '&pid=' + pid
-                                 + '&newRecordRow=' + newRecordRow;
+                       url = TYPO3.settings.ajaxUrls['t3lib_TCEforms_suggest::searchRecord'],
+                       params = {
+                               'table': table,
+                               'field': field,
+                               'uid': uid,
+                               'pid': pid,
+                               'newRecordRow': newRecordRow
+                       };
 
                $searchField.autocomplete({
                        // ajax options
                        serviceUrl: url,
+                       params: params,
+                       type: 'POST',
                        paramName: 'value',
                        dataType: 'json',
                        minChars: minimumCharacters,