From cee8504db9fa2f02948da5a4eb789d5d7ef07e8b Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 8 Aug 2018 06:21:01 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#656 where recently added Inputfield::setParent() update was causing issues (ListerPro config tab as one example) --- wire/core/Inputfield.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/wire/core/Inputfield.php b/wire/core/Inputfield.php index 7b2ef4bd..3650bb18 100644 --- a/wire/core/Inputfield.php +++ b/wire/core/Inputfield.php @@ -492,16 +492,6 @@ abstract class Inputfield extends WireData implements Module { * */ public function setParent(InputfieldWrapper $parent) { - if($this->parent && $this->parent instanceof InputfieldWrapper && $this->parent !== $parent) { - $oldRootParent = $this->getRootParent(); - if(!$oldRootParent) $oldRootParent = $this->parent; - $newRootParent = $parent->getRootParent(); - if(!$newRootParent) $newRootParent = $parent; - if($oldRootParent === $newRootParent) { - // if field staying in the same form, remove from previous parent - $this->parent->remove($this); - } - } $this->parent = $parent; return $this; }