Project

General

Profile

Actions

Bug #95628

closed

NewContentElementController's "saveAndClose" functionality does create content elements with setting pi_flexform in tt_content to null

Added by Denis Mir about 3 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2021-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When using the `NewContentElementController` and its `saveAndClose` functionality, the `pi_flexform` field gets set to `null` although a flexform is defined for the specific content element. As opposed to not using the `saveAndClose` functionality and saving the content element manually which fills the `pi_flexform` field.
This is a problem due to defaults coming from this flexform field (that a template would use) not being available in the frontend template (or the processor processing the flexform). An editor has to manually reopen and save the content element to get the `pi_flexform` field correctly set.

This is the part of the code that leads to this behaviour:

                    if (($wInfo['saveAndClose'] ?? false)) {
                        $viewVariables['target'] = (string)$this->uriBuilder->buildUriFromRoute('tce_db', [
                            'data' => [
                                'tt_content' => [
                                    StringUtility::getUniqueId('NEW') => array_replace($defVals, [
                                        'colPos' => $this->colPos,
                                        'pid' => $this->uid_pid,
                                        'sys_language_uid' => $this->sys_language,
                                    ]),
                                ],
                            ],
                            'redirect' => $this->R_URI,
                        ]);
                    }


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #91997: New content element wizard - saveAndClose - pi_flexformClosed2020-08-13

Actions
Actions #1

Updated by Denis Mir about 3 years ago

  • Subject changed from NewContentElementController's "saveAndClose" functionality does create content elements with setting pi_flexform to null to NewContentElementController's "saveAndClose" functionality does create content elements with setting pi_flexform in tt_content to null
Actions #2

Updated by Georg Ringer 6 months ago

  • Is duplicate of Bug #91997: New content element wizard - saveAndClose - pi_flexform added
Actions #3

Updated by Georg Ringer 6 months ago

  • Status changed from New to Closed

closing as duplicate of #91997 - an alternative way how to add flexforms is linked there as well

Actions

Also available in: Atom PDF