Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Jobs/UpdateSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function handle(): void
// Run the postupdate steps
$postUpdateResult = $connection->finalizeUpdate(["fromVersion" => $healthResult->cms_version]);

if (!$postUpdateResult->success) {
if (!$postUpdateResult->success && !$postUpdateResult->hasIgnorableError()) {
throw new UpdateException(
"finalize",
"Update for site failed in postprocessing: " . $this->site->id . ", errors: " . json_encode($postUpdateResult->errors),
Expand Down
19 changes: 19 additions & 0 deletions app/RemoteSite/Responses/FinalizeUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@ public function __construct(
public ?array $errors = null,
) {
}

public function hasIgnorableError(): bool
{
if (is_null($this->errors)) {
return false;
}

$errorString = (string) json_encode($this->errors);

if (str_contains($errorString, 'Undefined constant') && str_contains($errorString, 'T4PATH_MEDIA')) {
return true;
}

if (str_contains($errorString, 'Error on updating manifest cache') && str_contains($errorString, 'T4PATH_MEDIA')) {
return true;
}

return false;
}
}