Project

General

Profile

Actions

Bug #82104

closed

IRRE + GROUP with real MM relations not working (fatal error)

Added by Ronald Kools over 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-08-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
group, irre, relations
Complexity:
Is Regression:
Sprint Focus:

Description

See /typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php line 189:

  if ($type === 'select') {
         // A resolved select field is an array - take first value
         $value = $value['0'];
  } else {
         // A group field is still a list with pipe separated uid|tableName
          $valueParts = GeneralUtility::trimExplode('|', $value);
          $itemParts = explode('_', $valueParts[0]);
          $value = [
                'uid' => array_pop($itemParts),
                'table' => implode('_', $itemParts)
          ];
  }
  // @todo: This is weird, $value has different structure for group and select fields?
  $uniqueIds[$child['databaseRow']['uid']] = $value;

The ToDo says it all. ;-)

When not using a SELECT but a GROUP, this functions assumes the value is a string with a pipe for uid / tablename. However, when using real MM relations, $value contains an array with the uid and tablenames. This results in a fatal error:

#1476107295: PHP Warning: explode() expects parameter 2 to be string, array given in /vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1297 (More information)


Files

sample_0.0.1_201809271609.zip (7.55 KB) sample_0.0.1_201809271609.zip Cyril Janody, 2018-09-28 00:19

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #84735: InlineControlContainer wrongly assumes group field values are still a stringClosed2018-04-15

Actions
Actions

Also available in: Atom PDF