Bug #75139
closedf:form addQueryString="1" does not work correctly...
100%
Description
Scenario: tx_powermail form on an tx_news detail page.
The form action is missing the news detail query parameters which causes powermail to malfunction because it tries to submit the form to the news list page.
The form is inserted on the news detail page via the cObject view helper.
Example of TS:
lib { form = USER form { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run vendorName = In2code pluginName = Pi1 extensionName = Powermail controller = Form action = form settings =< plugin.tx_powermail.settings persistence =< plugin.tx_powermail.persistence view =< plugin.tx_powermail.view settings { setup { misc { addQueryString = 1 } main { form = 5 } } } } }
A temporary workaround was to create my own form view helper that implements the $addQueryStringMethod parameter.
Setting the addQueryStringMethod to GET prepends the query string.
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper { public function render( $action = null, array $arguments = array(), $controller = null, $extensionName = null, $pluginName = null, $pageUid = null, $object = null, $pageType = 0, $noCache = false, $noCacheHash = false, $section = '', $format = '', array $additionalParams = array(), $absolute = false, $addQueryString = false, $addQueryStringMethod = '', array $argumentsToBeExcludedFromQueryString = array(), $fieldNamePrefix = null, $actionUri = null, $objectName = null, $hiddenFieldClassName = null ) { return parent::render($action, $arguments, $controller, $extensionName, $pluginName, $pageUid, $object, $pageType, $noCache, $noCacheHash, $section, $format, $additionalParams, $absolute, $addQueryString, $argumentsToBeExcludedFromQueryString, $fieldNamePrefix, $actionUri, $objectName, $hiddenFieldClassName ); } }
Either please fix that addQueryString works in this scenario or add addQueryStringMethod as a default f:form parameter.
Thank you.
Updated by Gerrit Code Review about 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49642
Updated by Gerrit Code Review about 8 years ago
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/49642
Updated by Gerrit Code Review about 8 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/49642
Updated by Gerrit Code Review about 8 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/49642
Updated by Anonymous about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 980c8ffb213b2f04cb494e8f4e8f9934b666b678.