From 15d640e22b278122412e3d9c6304f5f96c227c02 Mon Sep 17 00:00:00 2001 From: David Merfield Date: Fri, 22 Nov 2024 11:17:34 +0100 Subject: [PATCH] Fixes bug with custom link format --- app/models/entry/_setUrl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/entry/_setUrl.js b/app/models/entry/_setUrl.js index 5974dc87e20..cea04de4c5d 100644 --- a/app/models/entry/_setUrl.js +++ b/app/models/entry/_setUrl.js @@ -51,7 +51,8 @@ var UID_PERMUTATIONS = 500; function Candidates (blog, entry) { var candidates = []; - + var format = blog.permalink.isCustom ? blog.permalink.custom : blog.permalink.format; + // Don't use the permalink format for pages // or posts with user specified permalinks. if ( @@ -60,7 +61,7 @@ function Candidates (blog, entry) { !entry.metadata.url && !entry.page ) { - entry.permalink = Permalink(blog.timeZone, blog.permalink.format, entry); + entry.permalink = Permalink(blog.timeZone, format, entry); debug("Permalink", entry.permalink); }