Project

General

Profile

Actions

Bug #80239

closed

create new IRRE-Element cause exception in multi-language-evoirement

Added by Dieter Porth over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Localization
Target version:
-
Start date:
2017-03-11
Due date:
% Done:

100%

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

Description

I used the TYPO3 8.6.1 - build via composer 6.3.2017
XAMPP PHP 7.0.5

Scenario:
- My Extension define some content-elements
- I have a content-element with an own model
- The CE has an 1:1 IRRE relation to an other model.
- If I try to create the IRRE-Relation in the backend in the default language, i se the estimated form
- If I try to save the created IRRE-Element, I got the exception below
- If I try to create the Element with my own frontend-editing (extbase; create Action with dummy-element-generation), the IRRE will be shown after that in the backend
- After I created the IRRE for the default language with my frontend-mechanism, I can use the feature of synchronisation of records for the other languages and it seems to work fine

Exception:


Uncaught TYPO3 Exception
Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeTranslationItem() must be of the type integer, null given, called in C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\DataHandling\Localization\DataMapProcessor.php on line 195

TypeError thrown in file
C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\DataHandling\Localization\DataMapProcessor.php in line 233.

14 TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeTranslationItem(TYPO3\CMS\Core\DataHandling\Localization\DataMapItem, array, NULL)

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\DataHandling\Localization\DataMapProcessor.php:

00193:                     $fromId = $item->getIdForScope($scope);
00194:                     $fieldNames = $this->getFieldNamesForItemScope($item, $scope, !$item->isNew());

00195:                     $this->synchronizeTranslationItem($item, $fieldNames, $fromId);

00196:                 }
00197:                 $this->populateTranslationItem($item);

13 TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::enrich()

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\DataHandling\Localization\DataMapProcessor.php:

00100:         if (!empty($this->items)) {
00101:             $this->sanitize();

00102:             $this->enrich();

00103:         }
00104:         return $this->dataMap;

12 TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::process()

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\DataHandling\DataHandler.php:

00982:         }
00983:         // Pre-process data-map and synchronize localization states

00984:         $this->datamap = DataMapProcessor::instance($this->datamap, $this->BE_USER)->process();

00985:         // Organize tables so that the pages-table is always processed first. This is required if you want to make sure that content pointing to a new page will be created.
00986:         $orderOfTables = [];

11 TYPO3\CMS\Core\DataHandling\DataHandler::process_datamap()

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Controller\EditDocumentController.php:

00573:             // Perform the saving operation with DataHandler:
00574:             $tce->process_uploads($_FILES);

00575:             $tce->process_datamap();

00576:             $tce->process_cmdmap();
00577:             // If pages are being edited, we set an instruction about updating the page tree after this operation.

10 TYPO3\CMS\Backend\Controller\EditDocumentController::processData()

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Controller\EditDocumentController.php:

01991:         // Checks, if a save button has been clicked (or the doSave variable is sent)
01992:         if ($this->doProcessData()) {

01993:             $this->processData();

01994:         }
01995: 

9 TYPO3\CMS\Backend\Controller\EditDocumentController::mainAction(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)

8 call_user_func_array(array, array)

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Http\RouteDispatcher.php:

00052:         $targetIdentifier = $route->getOption('target');
00053:         $target = $this->getCallableFromTarget($targetIdentifier);

00054:         return call_user_func_array($target, [$request, $response]);

00055:     }
00056: 

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

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Http\RequestHandler.php:

00138:         /** @var RouteDispatcher $dispatcher */
00139:         $dispatcher = GeneralUtility::makeInstance(RouteDispatcher::class);

00140:         return $dispatcher->dispatch($request, $response);

00141:     }
00142: }

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

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Http\RequestHandler.php:

00070:         // Check if the router has the available route and dispatch.
00071:         try {

00072:             return $this->dispatch($request);

00073: 
00074:         // When token was invalid redirect to login

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

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\core\Classes\Core\Bootstrap.php:

00308: 
00309:         // Execute the command which returns a Response object or NULL

00310:         $this->response = $requestHandler->handleRequest($request);

00311:         return $this;
00312:     }

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

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Classes\Http\Application.php:

00091:         }
00092: 

00093:         $this->bootstrap->handleRequest($this->request);

00094: 
00095:         if ($execute !== null) {

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

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Resources\Private\Php\backend.php:

00022:     $classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
00023: 

00024:     (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();

00025: });

2 {closure}()

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\sysext\backend\Resources\Private\Php\backend.php:

00023: 
00024:     (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();

00025: });

1 require("C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo…3\sysext\backend\Resources\Private\Php\backend.php")

C:\xampp\htdocs\comic\Source\vendor\typo3\cms\typo3\index.php:

00001: <?php
00002: 

00003: require __DIR__ . '/sysext/backend/Resources/Private/Php/backend.php';


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #81315: Translation of inline elements fails, when only one item is to be translatedClosed2017-05-23

Actions
Actions #1

Updated by Susanne Moog over 7 years ago

  • Category set to Localization

Can you attach a test extension with your scenario and TCA configuration please?

Actions #2

Updated by Susanne Moog over 7 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Dieter Porth over 7 years ago

Sorry. it would take too much time, to rebuild that system down to a test-system.
I plan to publish the main extension one or years - not earlier.
Perhaps I find to that the bug or a work-around.
Perhaps it's a misconfiguration cause my error.

Actions #4

Updated by Georg Tiefenbrunn over 7 years ago

Susanne Moog wrote:

Can you attach a test extension with your scenario and TCA configuration please?

Steps to reproduce this bug (TYPO3 8.7.1/composer running on Apache/2.4.10 (Debian) PHP 7.0.16):

  1. Create a CE Uploads, do not add any files.
  2. Translate the CE into another language.
  3. Edit the CE in the default language and add a file.
  4. Save > Uncaught TYPO3 Exception

Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeTranslationItem() must be of the type integer, string given, called in .../vendor/typo3/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php on line 244

Example values passed to $this->synchronizeTranslationItem($item, $fieldNames, $fromId); (see DataMapProcessor.php):

array(3 items)
   0 => TYPO3\CMS\Core\DataHandling\Localization\DataMapItem prototype object
      tableName => protected 'sys_file_reference' (18 chars)
      id => protected 'NEW59122ee449b49945896454' (25 chars)
      suggestedValues => protected array(7 items)
      persistedValues => protected array(empty)
      configurationFieldNames => protected array(4 items)
      new => protected TRUE
      type => protected 'directChild' (11 chars)
      state => protected NULL
      language => protected 1 (integer)
      parent => protected 'NEW59122ee0561bf003604069' (25 chars)
      source => protected NULL
      dependencies => protected array(empty)
   1 => array(empty)
   2 => 'NEW59122ee0561bf003604069' (25 chars)
Actions #5

Updated by Dieter Porth over 7 years ago

After the developing of the above used extension, I dont get the named eroror anymore.
But I can#t use the button 'localize all records' anymore in translated records.
I have now the same problem with the published extension borderstyle (8.0.1 - TYPO3-TER)

The localize-all-record-button works under 7.6 in localise theme-records, which contains an IRRE-related record.
The same procedure don't work with TYPO3 8.7.1.

see too german description of problem
https://forum.typo3.org/index.php/m/749971/#msg_749971

Actions #6

Updated by Oliver Hader over 7 years ago

  • Status changed from Needs Feedback to Accepted
  • Assignee set to Oliver Hader
Actions #7

Updated by Oliver Hader over 7 years ago

  • Status changed from Accepted to In Progress
Actions #8

Updated by Gerrit Code Review over 7 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #9

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #10

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #11

Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #12

Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #13

Updated by Oliver Hader over 7 years ago

@Georg: I cannot reproduce the behavior with a plain core setup using content-element of CType "uploads" and the steps you mentioned. From the DateMapItem you posted, it seems that there are no "l10n_mode=mergeIfNotBlank" (="allowLanguageSynchronization=true") fields. However, I guess, there are additional fields using "l10n_mode=exclude". If so, could you please post the TCA configuration of these fields of table "sys_file_reference" please? Besides that the DataMapIp contains a "NEW" identifier for the parent index, thus it seems the content-element is new an not just edited...

Thanks in advance!

Actions #14

Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #15

Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #16

Updated by Oliver Hader over 7 years ago

I installed version 8.0.1 of the "borderstyle" extension as mentioned in the forum post. However, I could not really get that extension using since it seems to violate several TYPO3 concepts. Besides that, a custom user-function is used to render some custom select field in tt_content. This custom code broke the whole FormEngine and FormEngine validation - that's why I've given up on analyzing data-structures further having "borderstyle" installed.

Actions #17

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #18

Updated by Gerrit Code Review over 7 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #19

Updated by Gerrit Code Review over 7 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #20

Updated by Gerrit Code Review over 7 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #21

Updated by Gerrit Code Review over 7 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #22

Updated by Gerrit Code Review over 7 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #23

Updated by Gerrit Code Review over 7 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #24

Updated by Gerrit Code Review over 7 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52871

Actions #25

Updated by Oliver Hader over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #26

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53211

Actions #27

Updated by Oliver Hader over 7 years ago

  • Status changed from Under Review to Resolved
Actions #28

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53213

Actions #29

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53213

Actions #30

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53214

Actions #31

Updated by Oliver Hader over 7 years ago

  • Status changed from Under Review to Resolved
Actions #32

Updated by Oliver Hader over 7 years ago

  • Has duplicate Bug #81315: Translation of inline elements fails, when only one item is to be translated added
Actions #33

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF