Skip to content

Commit 20be066

Browse files
committed
[BUGFIX] don't use pages uid 0 via l10n_parent
Fixes following error, if a translation page is inserted via TCE without l10n_parent: ``` ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\AbstractUpdateHandler::getAllCurrentStateFieldsMatch() : Argument #2 ($pageRecord) must be of type array, null given, called in /var/www/html/packages/ext-solr/Classes/Domain/Index/Queue/UpdateHandler/AbstractUpdateHandler.php on line 230 [0] (File: /var/www/html/packages/ext-solr/Classes/Domain/Index/Queue/UpdateHandler/AbstractUpdateHandler.php, line: 245) ```
1 parent 040a474 commit 20be066

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Classes/Domain/Index/Queue/UpdateHandler/DataUpdateHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ protected function processPageRecord(int $uid, int $pid, array $updatedFields =
400400

401401
// We need to get the full record to find out if this is a page translation
402402
$fullRecord = $this->getRecord('pages', $uid);
403-
if (($fullRecord['sys_language_uid'] ?? null) > 0) {
403+
if (($fullRecord['sys_language_uid'] ?? null) > 0 && (int)($fullRecord['l10n_parent']) > 0) {
404404
$uid = (int)$fullRecord['l10n_parent'];
405405
}
406406

Classes/Domain/Index/Queue/UpdateHandler/GarbageHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function performRecordGarbageCheck(
131131
// We need to get the full record to find out if this is a page translation
132132
$fullRecord = $this->getRecord('pages', $uid);
133133
$uidForRecursiveTriggers = $uid;
134-
if (($fullRecord['sys_language_uid'] ?? null) > 0) {
134+
if (($fullRecord['sys_language_uid'] ?? null) > 0 && (int)($fullRecord['l10n_parent']) > 0) {
135135
$uidForRecursiveTriggers = (int)$fullRecord['l10n_parent'];
136136
}
137137
$this->deleteSubEntriesWhenRecursiveTriggerIsRecognized($table, $uidForRecursiveTriggers, $updatedFields);

0 commit comments

Comments
 (0)