Project

General

Profile

Actions

Bug #77294

closed

Story #69617: FormEngine bugs

Backend form engine (inline,tt_content) CType=table wizard crashes on closing

Added by Henri Nathanson almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-07-28
Due date:
% Done:

0%

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

Description

Add an inline element - see TCA below. Open the record in the backend and add an inline record. Add the title first and save, only then the table wizard is available. Open the wizard and enter data. Klick save+leave or just the leave button. It crashes. Trace see below. It does save the data correctly. The behaviour depends on how the inline element is displayed as you open the parent record. If the inline is closed, the wizard it will crash. If the inline is open, the wizard will just work fine. For newly created records it may just always crash.

        'sheet' => array(
            'exclude' => 1,
            'label' => 'TABELLE',
            'config' => array(
                'type' => 'inline',
                'foreign_table' => 'tt_content',
                'foreign_record_defaults' => array(
                    'CType' => 'table'
                ),
                'minitems' => 0,
                'maxitems' => 1,
            )
        ),

TYPO3 7.6.10 with a patch for escaping - https://forge.typo3.org/issues/76668

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.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php on line 245 and defined in /var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php line 933 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 111.

11 TYPO3\CMS\Core\Error\ErrorHandler::handleError(4096, "Argument 1 passed to TYPO3\CMS\Backend\Controller\…rmInlineAjaxController.php on line 245 and defined", "/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncod…nd/Classes/Controller/FormInlineAjaxController.php", 933, array)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php:
00931:      * @return array The database row with the flexform data structure pointer columns added
00932:      */
00933:     protected function addFlexFormDataStructurePointersFromAjaxContext(array $ajaxArguments, array $databaseRow)
00934:     {
00935:         if (!isset($ajaxArguments['context'])) {

10 TYPO3\CMS\Backend\Controller\FormInlineAjaxController::addFlexFormDataStructurePointersFromAjaxContext(NULL, array)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php:
00243:         ];
00244: 
00245:         $databaseRow = $this->addFlexFormDataStructurePointersFromAjaxContext($ajaxArguments, $databaseRow);
00246: 
00247:         $formDataCompilerInputForParent = [

9 TYPO3\CMS\Backend\Controller\FormInlineAjaxController::detailsAction(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)
8 call_user_func_array(array, array)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Http/RouteDispatcher.php:
00052:         $targetIdentifier = $route->getOption('target');
00053:         $target = $this->getCallableFromTarget($targetIdentifier);
00054:         return call_user_func_array($target, array($request, $response));
00055:     }
00056: 

7 TYPO3\CMS\Backend\Http\RouteDispatcher::dispatch(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php:
00169:         /** @var RouteDispatcher $dispatcher */
00170:         $dispatcher = GeneralUtility::makeInstance(RouteDispatcher::class);
00171:         return $dispatcher->dispatch($request, $response);
00172:     }
00173: 

6 TYPO3\CMS\Backend\Http\AjaxRequestHandler::dispatch(TYPO3\CMS\Core\Http\ServerRequest)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php:
00087:         try {
00088:             // Backend Routing - check if a valid route is there, and dispatch
00089:             return $this->dispatch($request);
00090:         } catch (ResourceNotFoundException $e) {
00091:             // no Route found, fallback to the traditional AJAX request

5 TYPO3\CMS\Backend\Http\AjaxRequestHandler::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/core/Classes/Core/Bootstrap.php:
00300: 
00301:         // Execute the command which returns a Response object or NULL
00302:         $this->response = $requestHandler->handleRequest($request);
00303:         return $this;
00304:     }

4 TYPO3\CMS\Core\Core\Bootstrap::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/sysext/backend/Classes/Http/Application.php:
00092:         }
00093: 
00094:         $this->bootstrap->handleRequest($this->request);
00095: 
00096:         if ($execute !== null) {

3 TYPO3\CMS\Backend\Http\Application::run()

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/index.php:
00018: call_user_func(function () {
00019:     $classLoader = require __DIR__ . '/../vendor/autoload.php';
00020:     (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00021: });

2 {closure}()
1 call_user_func(Closure)

/var/www/typo3.sourcen/typo3_src-7.6.10-patchEncoding/typo3/index.php:
00019:     $classLoader = require __DIR__ . '/../vendor/autoload.php';
00020:     (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00021: });


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #81666: TYPO3 exception in table wizard, when table is nested in a record (e.g. tx_news)Closed2017-06-22

Actions
Actions #1

Updated by Christian Kuhn almost 8 years ago

  • Parent task set to #69617
Actions #2

Updated by Henri Nathanson almost 8 years ago

you may get around the problem with collapseAll = false

                'appearance' => array(
                    'collapseAll' => false
                ),
                'type' => 'inline',
                'foreign_table' => 'tt_content',
                'foreign_record_defaults' => array(
                    'CType' => 'table'
                ),
                'minitems' => 0,
                'maxitems' => 1,

Actions #3

Updated by Riccardo De Contardi almost 8 years ago

I Think I was able to reproduce this issue with version 7.6.11 and the "news" extension

Steps followed:

1) Install news extension and enable usage of content element in news record (see configuration under EM)
2) create a news item
3) add a content element and convert it into "table" CType
4) open the wizard and edit table cells
5) try to save and close

Result:

PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Backend\Controller\FormInlineAjaxController::addFlexFormDataStructurePointersFromAjaxContext() must be of the type array, null given, called in C:\typo3-src\typo3_src-7.6.11\typo3\sysext\backend\Classes\Controller\FormInlineAjaxController.php on line 245 and defined in C:\typo3-src\typo3_src-7.6.11\typo3\sysext\backend\Classes\Controller\FormInlineAjaxController.php line 934
Actions #4

Updated by Riccardo De Contardi almost 8 years ago

Also affects 8.4-dev (latest master)

Actions #5

Updated by Riccardo De Contardi over 7 years ago

Still affects 8.6-dev (latest master)

Actions #6

Updated by Riccardo De Contardi over 7 years ago

On latest master (8.7.1-dev) it seems impossible to save the content element inside the "news" element even without changing its type.

Error

Oops, an error occurred!
Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeTranslationItem() must be of the type integer, string given, called in /TYPO3-dists/typo3_master/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php on line 244

Is it a core error or related to EXT:news?

Actions #7

Updated by Riccardo De Contardi about 7 years ago

  • Related to Bug #81666: TYPO3 exception in table wizard, when table is nested in a record (e.g. tx_news) added
Actions #8

Updated by Riccardo De Contardi about 7 years ago

taken from the description of #81666:


In 7 I get the following exception:
Argument 1 passed to TYPO3\CMS\Backend\Controller\FormInlineAjaxController::addFlexFormDataStructurePointersFromAjaxContext() must be of the type array, null given, called in .../typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php on line 245

In 8 it says:
Empty context string given
RuntimeException thrown in file
.../typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php in line 750.
Actions #9

Updated by Marco Huber about 7 years ago

The FormInlineAjaxController-Exception also occurs if you use the extended RTE-Wizard (the button right beside an RTE to view only the RTE) in an inline element.

Actions #10

Updated by Joerg Kummer almost 7 years ago

Could reproduced on 8.7.7-dev

  • Prepair:
    • Install EXT:news 6.1.1
    • Create new News element
    • Goto tab 'Content elements' in this new News element,
    • Create new content element
    • Choose type 'Images' in this new content element
    • Go to tab 'Images' in this new content element
    • Add any image
    • Save this new News element
  • Reproduce Error:
    • Open this News element
    • Goto tab 'Content elements' and there to tab 'Images'
    • Edit Metadata of this file (opens new edit form)
    • Press 'close' or 'save/close' button (without changes)
    • You will get exeption '#1489751361: Empty context string given'

This causes a wrong returnUrl parameter, whcih should be used, to return back to the previous opened/edited element.
This occurse in inline records, with further edit wizards, which will be opened.

Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Needs Feedback

It seems solved, at least with 8.7.9 and ext:news 6.2.1 -can someone confirm it?

Actions #12

Updated by Joerg Kummer over 6 years ago

Yes seems to be solved. Tested with 8.7.10-dev and ext:news 6.1.1

Actions #13

Updated by Wouter Wolters over 6 years ago

  • Status changed from Needs Feedback to Closed

Solved.

Actions

Also available in: Atom PDF