From 407e61d934ebd15ea111b03943ba15ce1c2d86c6 Mon Sep 17 00:00:00 2001
From: Eileen McNaughton <emcnaughton@wikimedia.org>
Date: Tue, 29 Aug 2023 09:12:26 +1200
Subject: [PATCH] Fix remaining undefined properties by no longer calling
 unrelated preProcess

---
 CRM/Contact/Form/Domain.php           | 2 +-
 CRM/Contact/Form/Location.php         | 3 +--
 templates/CRM/Contact/Form/Domain.tpl | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/CRM/Contact/Form/Domain.php b/CRM/Contact/Form/Domain.php
index 42121b0371..24d6bf693b 100644
--- a/CRM/Contact/Form/Domain.php
+++ b/CRM/Contact/Form/Domain.php
@@ -73,7 +73,6 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
     $this->_action = CRM_Utils_Request::retrieve('action', 'String',
       $this, FALSE, 'view'
     );
-    CRM_Contact_Form_Location::preProcess($this);
   }
 
   /**
@@ -121,6 +120,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
     $this->addField('description', ['label' => ts('Description'), 'size' => 30]);
 
     //build location blocks.
+    $this->assign('addressSequence', CRM_Core_BAO_Address::addressSequence());
     CRM_Contact_Form_Edit_Address::buildQuickForm($this, 1);
     CRM_Contact_Form_Edit_Email::buildQuickForm($this, 1);
     CRM_Contact_Form_Edit_Phone::buildQuickForm($this, 1);
diff --git a/CRM/Contact/Form/Location.php b/CRM/Contact/Form/Location.php
index 222cd29f9a..02ea8de4f0 100644
--- a/CRM/Contact/Form/Location.php
+++ b/CRM/Contact/Form/Location.php
@@ -33,8 +33,7 @@ class CRM_Contact_Form_Location {
       $form->set($form->_addBlockName . '_Block_Count', $additionalblockCount);
     }
 
-    if (is_a($form, 'CRM_Event_Form_ManageEvent_Location')
-    || is_a($form, 'CRM_Contact_Form_Domain')) {
+    if (is_a($form, 'CRM_Event_Form_ManageEvent_Location')) {
       $form->_blocks = [
         'Address' => ts('Address'),
         'Email' => ts('Email'),
diff --git a/templates/CRM/Contact/Form/Domain.tpl b/templates/CRM/Contact/Form/Domain.tpl
index 08f98ba570..d1328bff1c 100644
--- a/templates/CRM/Contact/Form/Domain.tpl
+++ b/templates/CRM/Contact/Form/Domain.tpl
@@ -28,7 +28,7 @@
 
     <h3>{ts}Default Organization Address{/ts}</h3>
         <div class="description">{ts 1=&#123;domain.address&#125;}CiviMail mailings must include the sending organization's address. This is done by putting the %1 token in either the body or footer of the mailing. This token may also be used in regular 'Email - send now' messages and in other Message Templates. The token is replaced by the address entered below when the message is sent.{/ts}</div>
-        {include file="CRM/Contact/Form/Edit/Address.tpl" blockId=1 masterAddress='' parseStreetAddress=''}
+        {include file="CRM/Contact/Form/Edit/Address.tpl" blockId=1 masterAddress='' parseStreetAddress='' className=''}
     <h3>{ts}Organization Contact Information{/ts}</h3>
         <div class="description">{ts}You can also include general email and/or phone contact information in mailings.{/ts} {help id="additional-contact"}</div>
         <table class="form-layout-compressed">
-- 
2.25.1