Project

General

Profile

Actions

Bug #75139

closed

f:form addQueryString="1" does not work correctly...

Added by Jonathan Neugber about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2016-03-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #78553: Provide addQueryStringMethod to f:form VHClosedGeorg Ringer2016-11-03

Actions
Actions

Also available in: Atom PDF