Bug #83527

ViewHelper call "Valid arguments are: additionalAttributes, data "

Added by Hans-Georg Althoff 6 days ago. Updated 1 day ago.

Needs Feedback
Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I have build a own Extension with customn ViewHelpers.

With 8.7.9 it works fine. With 9.0 I get the following error message:

Valid arguments are: additionalAttributes, data

I call the Viewhelper with:
<hga:listTable setup="{Setup}" />

Also with the inline version: {hga:listTable(setup:Setup)}

I get the same error message. I could not found any document, which describes a change between 8 and 9 for calling the ViewHelper.

Windows Server 2012R2 with IIS and PHP fastCGI 7.2


#1 Updated by Georg Ringer 6 days ago

  • Status changed from New to Needs Feedback

Do able to identify the problem, can you please add your viewhelper code. thanks.

#2 Updated by Hans-Georg Althoff 6 days ago

class ListTableViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper  {

     * Renders a list table with horizontal and vertical gleider
     * @param array $setup the data to be render
     * @return string HTML code
     * @author Hans-Georg Althoff <hgalt@gmx.net>
    public function render($setup) {
        $temp = '';
        error_log("-start ViewHelper-");
        $temp .= "<div id='listTxt'>\n";
            case "File":
                $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:lhFile', 'hgaxlfedit');
                $temp .= " ".$setup['xlfN'].":";
            case "llFile":
                $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:lhLlFile', 'hgaxlfedit');
                $temp .= " ".$setup['sLL'].":";
            case "llCheck":
                $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:lhLlCheck', 'hgaxlfedit');
                $temp .= " ".$setup['sLL'].":";
            case "llCheckT":
                $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:lhLlCheckT', 'hgaxlfedit');
                $temp .= " ".$setup['sLL'].":";

        $temp .= "\n</div>\n";
        // List Box
        $value = $setup['xlf'];
        $iNum = count($value['items']);
        if($iNum != 0){
/*            $temp .= "<div style='width: 600px; border: 1px solid #bdbdbd;'>\n";
            $temp .= "<table class='Display' style=' border: 1px solid #bdbdbd; width: 100%; cellspacing: 0px; cellpadding: 1px; width: 100%; display:block; background: #fff;'>\n";
            $temp .= "<tr>\n<td>\n"; */
            $temp .= "<table id='header' class='List' style=' width: 100%; border: 1px solid #bdbdbd; cellspacing: 0px; cellpadding: 1px; display:block; background: #fff; font-family: sans-serif; font-size: 10pt;'> \n";
            $temp .= "\t<tr>\n";
            $temp .= "\t\t\t<th class = 'th1' style='text-align: left;'>";
            $temp .= "Unit";
            $temp .= "</th>\n";
            $temp .= "\t\t\t<th class = 'th2' style='text-align: left;'>";
            $temp .= "Source";
            $temp .= "</th>\n";
            $iTarget = strlen($value['target']);
            if( $iTarget> 1){
                $temp .= "\t\t\t<th class = 'th3' style='text-align: left;'>";
                $temp .= "Target";
                $temp .= "</th>\n";
            $temp .= "</tr>\n";
            $temp .= "</table>\n";
/*            $temp .= "</td>\n</tr>\n";
            $temp .= "<td>\n<tr>\n";*/
            $temp .= "<div class='tXLF' style = 'overflow-y:auto; overflow-x:auto; height:200px; border: 1px solid #bdbdbd; ' >\n";
            $temp .= "<table id='tXLF' class='tXLF' style = 'width: 100%; background: #fff; display: block; cellspacing: 0px; cellpadding: 1px; font-family: sans-serif; font-size: 10pt;'> \n";
//                error_log(count($value['items'])."-ListViewHelper");
;                foreach ($value['items'] as $item){
                    $temp .= "<tr class = 'item'>\n";
                    $temp .= "<td class='unit' min-width='50'>";
                    $temp .= $item['unit'];
                    $temp .= "</td>\n<td class = 'source' min-width='50'>";
                    $temp .= $item['source'];
                    $temp .= "</td>\n";
                    if( $iTarget> 1){
                        $temp .= "<td class = 'target' >";
                        $temp .= $item['target'];
                        $temp .= "</td>\n";
                    $temp .= "</tr>\n";
            $temp .= "</table>\n";
            $temp .= "</div>\n";
/*            $temp .= "</td>\n</tr>\n</table>\n";
            $temp .="</div>\n";*/
//            error_log($temp."-ListTable"); 
        }elseif(strcmp($setup['Txt'], 'llCheckT') == 0){
            $temp  = "<div id='tXLF' class='boxed' style='border: 1px solid green; padding: 25px; background-color: LightGreen; font-size: 12px;'>\n<p><b>";
            $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:CheckTarget', 'hgaxlfedit');
            $temp .= "</b></p><br/><p>";
            $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:CheckSourceE', 'hgaxlfedit');
            $temp .= "</p>\n</div>\n";
//            error_log($temp."-ListTable ".$setup['Txt']); 
        }elseif(strcmp($setup['Txt'], 'llCheck') == 0){
            $temp  = "<div id='tXLF' class='boxed' style='border: 1px solid green; padding: 25px; background-color: LightGreen; font-size: 12px;'>\n<p> <b>    ";
            $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:CheckSource', 'hgaxlfedit');
            $temp .= "</b></p><br/><p>     ";
            $temp .= \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:hgaxlfedit/Resources/Private/Language/locallang_db.xlf:CheckSourceE', 'hgaxlfedit');
            $temp .= "</p>\n</div>\n";
//            error_log($temp."-ListTable ".$setup['Txt']); 
    return $temp;

#3 Updated by Wouter Wolters 5 days ago

Hi Hans,

Your ViewHelper is not an AbstractTagBasedViewHelper. You should try to extend the ViewHelper from the AbstractViewHelper instead of the AbstractTagBasedViewHelper.

Furthermore I want to inform you that the render() method arguments is deprecated.

#4 Updated by Hans-Georg Althoff 1 day ago

Hi Wouter,

I have solved the render problem. Thanks for your help.

But if I using AbstractViewHelper I can only see the HTML source code in the backend, generated from the viewhelper,instead of the expected table.
With AbstractTagBasedViewHelper it is working as expected.
But with earlier versions of Typo3, this extension was also working with AbstractViewHelper!
What's could be get wrong?

Also available in: Atom PDF