Bug #72054
closedFAL inline in flexformDS fails
0%
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
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?
Updated by Tobi Kretschmann almost 9 years ago
yes it is related to #71436 as stated above
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
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
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
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. :-)
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.
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.
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)