From ca352f70a3f2b2e10ef1d5c7301aad8e50b867f7 Mon Sep 17 00:00:00 2001 From: ajay2108 Date: Mon, 7 Apr 2025 15:23:02 +0530 Subject: [PATCH 1/2] Can't upload image for custom customer address attribute #39720 --- .../Customer/Controller/Adminhtml/Address/Validate.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php b/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php index 0aa83133a2006..02e3338796b2a 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php @@ -109,7 +109,12 @@ public function execute(): Json */ private function validateCustomerAddress(DataObject $response): DataObject { - $addressForm = $this->formFactory->create('customer_address', 'adminhtml_customer_address'); + $addressForm = $this->formFactory->create( + 'customer_address', + 'adminhtml_customer_address', + [], + true + ); $formData = $addressForm->extractData($this->getRequest()); $errors = $addressForm->validateData($formData); From f8e7308cf11e830625227ea6fd9e82ff26e5d079 Mon Sep 17 00:00:00 2001 From: ajay2108 Date: Tue, 8 Apr 2025 12:46:31 +0530 Subject: [PATCH 2/2] static test failure fix --- .../Controller/Adminhtml/Address/Validate.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php b/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php index 02e3338796b2a..dcb225e6263b0 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Address/Validate.php @@ -1,4 +1,8 @@ formFactory->create( - 'customer_address', - 'adminhtml_customer_address', - [], - true + 'customer_address', + 'adminhtml_customer_address', + [], + true ); $formData = $addressForm->extractData($this->getRequest());