Project

General

Profile

Actions

Bug #75139

closed

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

Added by Jonathan Neugber over 8 years ago. Updated about 6 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 #1

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

Actions #2

Updated by Jan Helke about 8 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by Anonymous about 8 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF