From 58334577b5c274a65261fc964f3ad56fd2caf634 Mon Sep 17 00:00:00 2001 From: tobimori Date: Fri, 26 Jan 2024 01:23:52 +0100 Subject: [PATCH] fix robots section not working on drafts, maybe closing #60 --- blueprints/fields/robots.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/fields/robots.php b/blueprints/fields/robots.php index a6d542f..d60efaf 100644 --- a/blueprints/fields/robots.php +++ b/blueprints/fields/robots.php @@ -21,7 +21,7 @@ $path = $kirby->request()->path()->data()[2]; - $page = page(Str::replace($path, '+', '/')); + $page = App::instance()->site()->findPageOrDraft(Str::replace($path, '+', '/')); foreach ($kirby->option('tobimori.seo.robots.types') as $robots) { $upper = Str::ucfirst($robots);