Project

General

Profile

Actions

Bug #101835

closed

fieldValue not supplied for user function defined field in install tool

Added by Daniel Fischer 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Start date:
2023-09-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When rendering a custom field by using type=user for extension settings in ext_conf_template.txt, the fieldValue for the params array is not supplied but fieldName is. The variable is set but empty.
Use case for the user function would be to render a custom password field.

The user function field is rendered via {configurationItem.html -> f:format.raw()} in ExtensionForm.html (/sysext/install/Resources/Private/Partials/Settings/ExtensionConfiguration).
Previously in version 11 there was a ViewHelper ( core:form.typoScriptConstants ) that supplied the values for fieldName and fieldValue.

The issue should be somewhere in extensionConfigurationGetContentAction() in /sysext/install/Classes/Controller/SettingsController.php

Example extension configuration:

ext_conf_template.txt:
# cat=My Settings/important/a; type=user[<Vendor>\<Extension>\<Some Namespace>\PasswordField->render]; label=My important password
important.options.password =

PasswordField.php:

class PasswordField
{
    public function render(array $params)
    {
        $fieldName = $params['fieldName'];
        $fieldValue = $params['fieldValue']; //Variable is set but empty!
        return "<input class='form-control' id='em-ext_key-important.options.{$fieldName}' type='password' name='important.options.{$fieldName}' value='{$fieldValue}'>";
    }
}


Related issues 1 (1 open0 closed)

Is duplicate of TYPO3 Core - Bug #99498: "type=user" in ext_conf_template.txt: Value is not passed to custom method anymoreAccepted2023-01-09

Actions
Actions #1

Updated by Georg Ringer 8 months ago

  • Is duplicate of Bug #99498: "type=user" in ext_conf_template.txt: Value is not passed to custom method anymore added
Actions #2

Updated by Georg Ringer 8 months ago

  • Status changed from New to Closed

thanks for your report. closed as duplicate of #99498 which also contains a temporary solution

Actions

Also available in: Atom PDF