From 339ac4f0a401b3ee26449cb86c3d04e7195b59e0 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Mon, 7 Sep 2020 13:25:40 +0200 Subject: [PATCH] Fix tri-Boolean check in PageNaming Module (#1931) If language_root is set to `false`, non-language-root pages will not be recognised as such, leading to odd behaviours. --- app/models/alchemy/page/page_naming.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/alchemy/page/page_naming.rb b/app/models/alchemy/page/page_naming.rb index 489259252a..c31bfc3907 100644 --- a/app/models/alchemy/page/page_naming.rb +++ b/app/models/alchemy/page/page_naming.rb @@ -68,7 +68,7 @@ def visible_ancestors base.push(parent) if parent.visible? end else - ancestors.visible.contentpages.where(language_root: nil).to_a + ancestors.visible.contentpages.where(language_root: [nil, false]).to_a end end