Project

General

Profile

Actions

Bug #25805

closed

Adding a new task with additional fields saves the wrong values in the additional fields

Added by Michael Franzkowiak over 13 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Category:
scheduler
Target version:
Start date:
2011-04-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If you have some task in the sheduler and you add a new task which has some additional fields which are name in the same wording as a field in an already existing task, this field is part of the form section but not visible.
If this existing additional field comes in the form part after the visible field, the value of the unvisible field will be take instead of the value of the visibile field.
It's the same if the field is an input field or a select box.
The problem is, if you don't edit the task again, you have no info about the wrong field setting. Only if you re-edit the task, correct the values and save again, the correct values will be stored.
You can check this, if you place 2 different tasks with the same naming of the additional fields. The first task will be saved correct. The 2nd task has in the Post-vars the values of the 1st task.
You can fix this if you change the section
display additional fields in typo3/sysext/scheduler/mod1/index.php

from


// Add each field to the display, if there are indeed any
if (isset($fields) && is_array($fields)) {
    foreach ($fields as $fieldID => $fieldInfo) {
        $table[$tr][] = t3lib_BEfunc::cshItem($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $this->backPath, '|', false, 'margin-bottom:0px;');
        $table[$tr][] = '<label for="' . $fieldID . '">' . $GLOBALS['LANG']->sL($fieldInfo['label']) . '</label>';
        $table[$tr][] = $fieldInfo['code'];
        $tableLayout[$tr] = array (
            'tr'     => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle .' class="extraFields extra_fields_' . $class . '">', '</tr>'),
            'defCol' => $defaultCell
        );
        $tr++;
    }
}

to


// Add each field to the display, if there are indeed any
if (isset($fields) && is_array($fields)) {
    foreach ($fields as $fieldID => $fieldInfo) {
        if ($class == $taskInfo['class']) {
            $table[$tr][] = t3lib_BEfunc::cshItem($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $this->backPath, '|', false, 'margin-bottom:0px;');
            $table[$tr][] = '<label for="' . $fieldID . '">' . $GLOBALS['LANG']->sL($fieldInfo['label']) . '</label>';
            $table[$tr][] = $fieldInfo['code'];
            $tableLayout[$tr] = array (
                'tr'     => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle .' class="extraFields extra_fields_' . $class . '">', '</tr>'),
                'defCol' => $defaultCell
            );
            $tr++;
        }
    }
}


Related issues 1 (0 open1 closed)

Blocks TYPO3 Core - Bug #67241: FAL: Update storgae index doesn't save "Storage to index" on first saveClosedMichael Oehlhof2015-06-02

Actions
Actions

Also available in: Atom PDF