#97684DataHandler::addDefaultPermittedLanguageIfNotSet gets called with $pageId===null
Description
I was doing an import of a hierarchical page tree. The import on level 1 failed (due to a missing default value for the database).
In line 7416 of the data handler this lead to just not creating the page record. It creates an entry in the log but does not fail the import.
Now uppon importing the next page the desired root page does not exists.
The local variable `$theRealPid` is not type-safe however and even initialized with “null” in line 885. However `$theRealPid` is used in line 944 as third parameter
of addDefaultPermittedLanguageIfNotSet. If it is still null here this causes a type error as the method only allows an integer as third parameter. This causes a hard to debug error as the actual problem happened not with the record in question but the previous record.
Chaning line 944 to `$this->addDefaultPermittedLanguageIfNotSet($table, $incomingFieldArray, $theRealPid ?? 0);` the import – of course – still fails. However instead of a php type error I get a propper error in the Import/Export tool.
TYPO3 11.5.10, reproduced on current 11.5 branch of the mono-repository. Didn’t check on main yet.
Reviews 4
Related issues 1
History 38
-
Nikita Hovratov changed Related to #98068 <span data-processor="relativetime" data-value="2023-03-20T11:04:28+00:00" > 03/20/23, 11:04 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 94515 status
NewUnder Review <span data-processor="relativetime" data-value="2026-06-16T08:18:54+00:00" > 06/16/26, 08:18 </span> -
Gerrit Code Review pushed patch set 1 for main to change 94516 <span data-processor="relativetime" data-value="2026-06-16T08:20:48+00:00" > 06/16/26, 08:20 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 94516 <span data-processor="relativetime" data-value="2026-06-16T08:26:22+00:00" > 06/16/26, 08:26 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96436 <span data-processor="relativetime" data-value="2026-10-06T23:24:21+00:00" > 10/06/26, 23:24 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96592 <span data-processor="relativetime" data-value="2026-10-10T09:52:41+00:00" > 10/10/26, 09:52 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-10T10:40:11+00:00" > 10/10/26, 10:40 </span>Applied in changeset commit:960fd1d04ee9ae5a1537967e535c5daf9ddcb644.
I got the same error message while importing, but probably for a different reason.
In my case, the error occurs during
\TYPO3\CMS\Impexp\Import::setRelationrelated to a field ofl10n_mode=excludewhich references asys_file_reference.The reference, which originally should be created as part of the import, is removed in favor of a new record created as part of the pre-processing of the datamap (
public/typo3/sysext/core/Classes/DataHandling/DataHandler.php:852). This new record does not provide apidwhich leads to this error.Therefore, it seems like importing localized fields with the
l10n_mode=excludeconfiguration is currently not working.