Project

General

Profile

Actions

Bug #72054

closed

FAL inline in flexformDS fails

Added by Tobi Kretschmann almost 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2015-12-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
FAL, Flexform, gridelements
Complexity:
Is Regression:
No
Sprint Focus:

Description

Using an inline field in a flexform leads to an internal server error (500).

#1446996319: Configuration retrieved from FlexForm is incomplete or not of type "inline". (More information)

UnexpectedValueException thrown in file
/var/www/feride.loc/Source/vendor/typo3/cms/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php in line 840.

Attached is the flexform which is used to add an image via FAL. After the Image is selected from the popup an JS alert appears "Error: 500 Internal Server Error".
Also attached is the thrown exception coming from the ajax request.

I already applied the patch of this related bug #71436 but unfortunately did not solve my problem.

I included the flexform like this:

tx_gridelements.setup {
    sectionWrapper {
        title = my title
        flexformDS = FILE:EXT:myext/Configuration/FlexForms/flexform_fal.xml
        config {
            colCount = 1
            rowCount = 1
            rows {
                1 {
                    columns {
                        1 {
                            name = Content
                            colPos = 0
                        }
                    }
                }
            }
        }
    }
}


Files

flexform_fal.xml (2.92 KB) flexform_fal.xml Tobi Kretschmann, 2015-12-04 09:40
typo3_761dev_ff_fal.jpg (239 KB) typo3_761dev_ff_fal.jpg Tobi Kretschmann, 2015-12-04 09:40

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #71436: Inline in flex with multiple DS failsClosed2015-11-09

Actions
Has duplicate TYPO3 Core - Bug #72393: Inline FAL record in gridelements flexform failsClosed2015-12-22

Actions
Actions #1

Updated by Andreas Kienast almost 9 years ago

  • Status changed from New to Needs Feedback

Is this related to / a dupe of the solved ticket #71436?

Actions #2

Updated by Tobi Kretschmann almost 9 years ago

yes it is related to #71436 as stated above

Actions #3

Updated by Henning Liebe almost 9 years ago

Tested this issue with the latest 7.6.1-dev and this special case is not resolved

Actions #4

Updated by Morton Jonuschat almost 9 years ago

  • Status changed from Needs Feedback to Rejected
  • Target version deleted (7.6.1)

This boils down to a bug in GridElements which access information (CType and tx_gridelements_backend_layout columns in the database row) which is no longer available in BackendUtilityGridelements::getFlexFormDS_postProcessDS().

The Breaking change is documented here (although it mostly talks about user functions, not hooks in specific):
https://wiki.typo3.org/TYPO3.CMS/Releases/7.6/Breaking#Breaking:_.2370132_-_FormEngine_custom_functions

Actions #5

Updated by Jo Hasenau almost 9 years ago

Well - in the case of gridelements the stuff that is breaking has nothing to do with the hook but fails due to the fact that there is now "parent" in \TYPO3\CMS\Backend\Controller\FormInlineAjaxController::createAction..

// Parent, this table embeds the child table
        $parent = $inlineStackProcessor->getStructureLevel(-1);
        $parentFieldName = $parent['field'];

        if (MathUtility::canBeInterpretedAsInteger($parent['uid'])) {
            $command = 'edit';
            $vanillaUid = (int)$parent['uid'];
            $databaseRow = [
                // TcaInlineExpandCollapseState needs the record uid
                'uid' => (int)$parent['uid'],
            ];
        } else {
            $command = 'new';
            $databaseRow = [];
            $vanillaUid = (int)$inlineFirstPid;
        }
        $formDataCompilerInputForParent = [
            'vanillaUid' => $vanillaUid,
            'command' => $command,
            'tableName' => $parent['table'],
            'databaseRow' => $databaseRow,
            'inlineFirstPid' => $inlineFirstPid,
            'columnsToProcess' => [
                $parentFieldName
            ],
            // Do not resolve existing children, we don't need them now
            'inlineResolveExistingChildren' => false,
        ];

Without a parent there is no table thus giving you:

Uncaught TYPO3 Exception
#1437654409: No $tableName given (More information)

InvalidArgumentException thrown in file
/var/www/typo3-7x.io/typo3/sysext/backend/Classes/Form/FormDataCompiler.php in line 81.

AFAICS there is no hook or gridelements specific userfunc involved until that point, but there is a return call_user_func_array($target, array($request, $response)); within the RouteDispatcher

Actions #6

Updated by Jo Hasenau almost 9 years ago

OK - with latest TYPO3 master it as changed to

Uncaught TYPO3 Exception
#1: PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Backend\Controller\FormInlineAjaxController::addFlexFormDataStructurePointersFromAjaxContext() must be of the type array, null given, called in /var/www/typo3-7x.io/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php on line 74 and defined in /var/www/typo3-7x.io/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php line 873 (More information)

Will dig deeper now. :-)

Actions #7

Updated by Dan no-lastname-given almost 9 years ago

Any news on that bug?
It's still not fixed. There are a few other related tickets but none of them has solved the problem yet.
There is still no way to add images using 7.6.2, fluid_styled_content & gridelements.

Actions #8

Updated by Dan no-lastname-given almost 9 years ago

I found the solution for the bug (at least the solution for me. It seems that I had another problem that resolved in the same error).
I had to activate the mb_string extension in php and the problem was gone. I immediately could add images without any errors.

Actions #9

Updated by Tymoteusz Motylewski over 8 years ago

I had the same issue, and it turned out to be an issue in Flux.
It's already solved in commit https://github.com/FluidTYPO3/flux/commit/6508a5fb26af1511ab5d6309d7e6ffffcc222f1d
however it's not released yet to TER (you need to checkout "development" branch of flux)

Actions

Also available in: Atom PDF