Skip to content

Commit

Permalink
Remove update warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
coastforge-mei committed Apr 2, 2024
1 parent 5646600 commit 48de55c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Classes/C4GImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ private function getSqlFromJson($file, $uuid, $importDataType, $imagePath): arra
$updateWhereQueryValue = $importDbValue;
} elseif ($queryType == 'UPDATE' && $importDbField == 'path' && $importDB == 'tl_files') {
$updateWhereQueryValue = $importDbValue;
} elseif ($updateWhereQuery && $importDbField && $updateWhereQuery == ' WHERE id=' && $importDbField == 'id') {
} elseif (isset($updateWhereQuery) && $updateWhereQuery && $importDbField && $updateWhereQuery == ' WHERE id=' && $importDbField == 'id') {
$updateWhereQueryValue = $allIdChanges[$importDB]['id'][$importDataset['id']];
}

Expand Down
8 changes: 6 additions & 2 deletions src/Classes/Callback/C4GImportDataCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@ public function updateBaseData($importId = false)

$this->importBaseData($importId);

PageRedirect::redirect('/contao?do=c4g_io_data');
try {
PageRedirect::redirect('/contao?do=c4g_io_data');
} catch (Exception $e) {
//do nothing - cron error
}
}

/**
Expand Down Expand Up @@ -1008,7 +1012,7 @@ private function getSqlFromJson($relations,$relationTables,$relationTablesPrimar
$updateWhereQueryValue = $importDbValue;
} elseif ($queryType == 'UPDATE' && $importDbField == 'path' && $importDB == 'tl_files') {
$updateWhereQueryValue = $importDbValue;
} elseif ($updateWhereQuery == ' WHERE id=' && $importDbField == 'id') {
} elseif (isset($updateWhereQuery) && $updateWhereQuery == ' WHERE id=' && $importDbField == 'id') {
$updateWhereQueryValue = $allIdChanges[$importDB]['id'][$importDataset['id']];
}

Expand Down

0 comments on commit 48de55c

Please sign in to comment.