#75139f:form addQueryString="1" does not work correctly...
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.