From 4a1455d05e8ae5777e9b88a5955d1c75de4ab4b4 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 12 Dec 2024 08:58:48 -0700 Subject: [PATCH] Fix sub-templates may not have been properly validated 3rd try --- api/src/Etemplate/Widget/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Template.php b/api/src/Etemplate/Widget/Template.php index b84f3d4b2f..890d5bd389 100644 --- a/api/src/Etemplate/Widget/Template.php +++ b/api/src/Etemplate/Widget/Template.php @@ -252,7 +252,7 @@ class Template extends Etemplate\Widget $expand_name = self::expand_name($this->original_name, '','','','',self::$request->content); } //error_log("$this running $method_name() cname: {$this->id} -> expand_name: $expand_name"); - if($expand_name && $expand_name != $this->id) + if($expand_name && ($expand_name != $this->id || count($this->children) == 0)) { if (($row_template = self::instance($expand_name))) {