From 8e91a05fd111ffee2f0ac0aef486259412f462ba Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 6 Dec 2019 13:51:49 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#1043 --- wire/core/Config.php | 2 +- .../modules/Process/ProcessTemplate/ProcessTemplate.module | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wire/core/Config.php b/wire/core/Config.php index cb8cb3f3..2116f161 100644 --- a/wire/core/Config.php +++ b/wire/core/Config.php @@ -293,7 +293,7 @@ class Config extends WireData { if(substr($url, -1) !== '/' && strpos($url, '?') === false && strpos($url, '#') === false) $url .= '/'; } - if(!empty($path)) $this->paths->set($for, $dir); + if(!empty($dir)) $this->paths->set($for, $dir); if(!empty($url)) $this->urls->set($for, $url); return $this; diff --git a/wire/modules/Process/ProcessTemplate/ProcessTemplate.module b/wire/modules/Process/ProcessTemplate/ProcessTemplate.module index 765597d1..e6298963 100644 --- a/wire/modules/Process/ProcessTemplate/ProcessTemplate.module +++ b/wire/modules/Process/ProcessTemplate/ProcessTemplate.module @@ -69,8 +69,11 @@ class ProcessTemplate extends Process { */ public function init() { - $this->moduleInfo = self::getModuleInfo(); - $this->headline($this->moduleInfo['title']); + $process = $this->wire('process'); + if("$process" === "$this") { + $this->moduleInfo = self::getModuleInfo(); + $this->headline($this->moduleInfo['title']); + } if(isset($_POST['id'])) { $this->id = (int) $_POST['id'];