Issue Bug Closed

#65126Refindex not correctly updated for flexform fields

Dominique Kreemers 02/17/15, 15:50 updated 10/02/18, 11:46

Description

This occurs in TYPO3 6.2.9.

When saving content elements with flexform fields the refindex isn’t updated.
Therefore the grouping in the workspace module is not working as expected.

This seems like a wrong method call in typo3/sysext/core/Classes/Database/ReferenceIndex.php -> getRelations_flexFormCallBack on line 494.
https://forge.typo3.org/projects/typo3cms-core/repository/revisions/6.2.9/entry/typo3/sysext/core/Classes/Database/ReferenceIndex.php#L494

$resultsFromDatabase = $this->getRelations_procDB($dataValue, $dsConf, $uid, $field);

The method is defined like this:

/**
 * Check field configuration if it is a DB relation field and extract DB relations if any
 *
 * @param string $value Field value
 * @param array $conf Field configuration array of type "TCA/columns
 * @param integer $uid Field uid
 * @param string $table Table name
 * @param string $field Field name
 * @return array If field type is OK it will return an array with the database relations. Else FALSE
 * @todo Define visibility
 */
public function getRelations_procDB($value, $conf, $uid, $table = '', $field = '') {

After changing the call to

$resultsFromDatabase = $this->getRelations_procDB($dataValue, $dsConf, $uid, $table, $field);

the generated sys_refindex records looked very promising, but unfortunately the grouping in the workspace module is still not working for related records (e.g. sys_file_reference records).

Reviews 4