Project

General

Profile

Actions

Bug #70904

closed

IRRE: foreign_record_defaults for colPos gets trimmed

Added by Sven Teuber about 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2015-10-21
Due date:
% Done:

100%

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

Description

TYPO3 7.5

Use-case:
Referencing tt_content in IRRE elements, the child elements pop up in the standard content area due to them having the same colPos as the parent element. If only you could assign the IRRE children some other colPos to hide them (like, 1 if gridelements is installed ;))!

Issue:
If you configure an inline element in the TCA and try to set the colPos using the foreign_record_defaults array, the colPos-value gets trimmed to the first character.

Example:

TCA:
'myColumn' => array(
'exclude' => 1,
'label' => 'IRRE relation to tt_content',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_field' => 'tx_myext_irre_parent',
'foreign_record_defaults' => array(
'colPos' => '56'
)
),
),

this will set the colPos select field in the newly created IRRE element to "5"

'foreign_record_defaults' => array(
'colPos' => '-1'
)

> will set the colPos select field value to "-"

There seems to happen a trim of the value down to the first character. It happens here somewhere:

typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php, line 290:

$nodeFactory = GeneralUtility::makeInstance(NodeFactory::class);
$childArray = $nodeFactory->create($formData)->render();

While in $formData['inlineRelatedRecordToRender'], the colPos-value is still intact,
it is trimmed down to the first character in the returned $childArray

I think the value shouldn't be trimmed, but left untouched.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #71293: `foreign_record_defaults` is not stored when the field hiddenClosed2015-11-03

Actions
Actions

Also available in: Atom PDF