Project

General

Profile

Bug #25805

Updated by Mathias Schreiber about 9 years ago

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  
 <pre><code> 
 // 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++; 
		 } 
	 } 
 } 
 </code></pre>

Back