diff --git a/app/Helpers/TranslationHelper.php b/app/Helpers/TranslationHelper.php index 25ba12a3..b3e7306c 100644 --- a/app/Helpers/TranslationHelper.php +++ b/app/Helpers/TranslationHelper.php @@ -97,7 +97,7 @@ class TranslationHelper ->whereKeyNot($model->getKey()) ->whereRaw("JSON_SEARCH(`{$dbAttribute}`, 'one', ?) IS NOT NULL", [$value]); - if ($anotherDbAttribute !== null && $anotherValue !== null) { + if ($anotherDbAttribute !== null) { $query->where($anotherDbAttribute, $anotherValue); } if ($query->exists()) { diff --git a/resources/ts/back/Pages/DynamicPages/Form.tsx b/resources/ts/back/Pages/DynamicPages/Form.tsx index 880b3d4e..1ff3d9c8 100644 --- a/resources/ts/back/Pages/DynamicPages/Form.tsx +++ b/resources/ts/back/Pages/DynamicPages/Form.tsx @@ -253,9 +253,7 @@ export default function Form({ modelName={useTrans(`models.classes.${modelName}`, { choice: 1, })} - pathField={data.isRoot ? "" : dynamicPageUrl - .replace(url, "") - .replace(/^\/+/, "")} + pathField={data.isRoot ? "" : (dynamicPageUrl ?? "").replace(url, "").replace(/^\/+/, "")} isAvailable={ model?.status === enumDynamicPageStatus.published.value