From 54f3fa0e1b19e90195058c78652298121675cd40 Mon Sep 17 00:00:00 2001
From: Nikita Hovratov <nikita.h@live.de>
Date: Tue, 16 May 2023 16:38:32 +0200
Subject: [PATCH] [BUGFIX] Fix undefined array key in
 FrontendGenerationPageIndexingTrigger

This is an edge-case, where `config.index_enable = 1` is set, but the
static TypoScript from indexed_search is not included and thus
`config.index_externals` is undefined.

Resolves: #100888
Releases: main, 12.4, 11.5
Change-Id: I0b9fa04970812ca82edc4d223cd57e59e3a2ed83
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79070
Tested-by: core-ci <typo3@b13.com>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
---
 .../indexed_search/Classes/Hook/TypoScriptFrontendHook.php      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/indexed_search/Classes/Hook/TypoScriptFrontendHook.php b/typo3/sysext/indexed_search/Classes/Hook/TypoScriptFrontendHook.php
index 99a343151ddd..1cb32bf20e96 100644
--- a/typo3/sysext/indexed_search/Classes/Hook/TypoScriptFrontendHook.php
+++ b/typo3/sysext/indexed_search/Classes/Hook/TypoScriptFrontendHook.php
@@ -116,7 +116,7 @@ class TypoScriptFrontendHook
         $configuration['mtime'] = $tsfe->register['SYS_LASTCHANGED'] ?? $tsfe->page['SYS_LASTCHANGED'];
         // Most recent modification time (seconds) of the content on the page. Used to evaluate whether it should be re-indexed.
         // Configuration of behavior
-        $configuration['index_externals'] = $tsfe->config['config']['index_externals'];
+        $configuration['index_externals'] = $tsfe->config['config']['index_externals'] ?? true;
         // Whether to index external documents like PDF, DOC etc. (if possible)
         $configuration['index_descrLgd'] = $tsfe->config['config']['index_descrLgd'] ?? 0;
         // Length of description text (max 250, default 200)
-- 
GitLab