This commit is contained in:
2026-02-03 03:26:41 +01:00
parent 5c2efaafa5
commit 0c3a2bffeb
2 changed files with 28 additions and 1 deletions

View File

@@ -1 +1 @@
1.2.25
1.2.26

View File

@@ -1324,6 +1324,33 @@ class ApiKernel
$contentId = (int)$this->val($this->in, ['content_id', 'content'], 0);
if ($contentId <= 0) $this->fail('content_id required', null, 422);
$refsDebug = [];
$refs = $this->findTemplateReferences($customerId, $contentId, $refsDebug);
if (!empty($refsDebug)) {
$this->writeDebugLog('templates_references_debug', $refsDebug);
}
if (!empty($refs)) {
debug_log_write('templates_toggle', [
'time' => date(DATE_ATOM),
'action' => 'content_versions.deactivate.blocked',
'customer_id' => $customerId,
'content_id' => $contentId,
'references' => $refs,
'input' => $this->in,
], [
'append' => true,
'json' => true,
'newline' => true,
]);
$this->respond([
'ok' => false,
'error' => 'Template wird in anderen Templates verwendet',
'content_id' => $contentId,
'count' => count($refs),
'references' => $refs,
], 409);
}
$ok = $this->deactivateContentVersion($customerId, $contentId);
debug_log_write('templates_toggle', [
'time' => date(DATE_ATOM),