Skip to content

Commit

Permalink
[BUGFIX] Fix failed indexing logging
Browse files Browse the repository at this point in the history
If event AfterCacheableContentIsGeneratedEvent is not dispatched
the indexing failed silently, this is fixed with #3735 but
the logging is faulty and doesn't consider the indexing status.
This commit fixes the logging, by checking the state in response
data array.

Relates: #3735
  • Loading branch information
dkd-friedrich authored and dkd-kaehm committed Oct 13, 2023
1 parent c06f14a commit 13d5867
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Classes/IndexQueue/FrontendHelper/PageIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,15 @@ public function deactivate(PageIndexerResponse $response): void
if ($this->activated) {
if (!isset($this->responseData['pageIndexed'])) {
$this->responseData['pageIndexed'] = false;
}
$response->addActionResult($this->action, $this->responseData);

$this->setupConfiguration();
if ($this->configuration->getLoggingExceptions()) {
$this->logger->error(
'Unknown exception while trying to index page',
);
$this->setupConfiguration();
if ($this->configuration->getLoggingExceptions()) {
$this->logger->error(
'Unknown exception while trying to index page',
);
}
}
$response->addActionResult($this->action, $this->responseData);
}
$this->activated = false;
}
Expand Down

0 comments on commit 13d5867

Please sign in to comment.