From 5ac43d1cd46a0a05ce4b5942dc31abc74d79128b Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 19 Sep 2023 13:03:15 +0100 Subject: [PATCH] Template lookup should use slug, not the full permalink --- packages/edit-site/src/store/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/store/actions.js b/packages/edit-site/src/store/actions.js index 3b4b9bd49387f1..61569482c69dbf 100644 --- a/packages/edit-site/src/store/actions.js +++ b/packages/edit-site/src/store/actions.js @@ -291,11 +291,11 @@ export const setPage = } else { // If a page has a `template` set and is not included in the list // of the current theme's templates, query for current theme's default template. - template = await getDefaultTemplate( editedEntity?.link ); + template = await getDefaultTemplate( editedEntity?.slug ); } } else { // Page's `template` is empty, that indicates we need to use the default template for the page. - template = await getDefaultTemplate( editedEntity?.link ); + template = await getDefaultTemplate( editedEntity?.slug ); } }