Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on customer screen in admin area #4487

Closed
Caprico85 opened this issue Jan 15, 2025 · 1 comment · Fixed by #4488
Closed

Error on customer screen in admin area #4487

Caprico85 opened this issue Jan 15, 2025 · 1 comment · Fixed by #4488
Assignees

Comments

@Caprico85
Copy link
Contributor

I think the recent upgrade to OpenMage 20.12.0 introduced an error on the customer screen in the admin area.

The tab menu now looks like this:

image

This is a screenshot from our heavily modified OpenMage install. I had no time to verify this on an unmodified OpenMage install. But I am pretty sure it would happen there too.


The problem can be traced to these changes:

diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
index a34ce76507a..ef85b2ecdd6 100644
--- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
+++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
@@ -165,7 +165,11 @@ function(v, elem){
                             ->__('Password must be at least of %d characters.', $minPasswordLength),
                     ],
                 );
-                $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
+
+                $renderer = $this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass');
+                if ($renderer instanceof Varien_Data_Form_Element_Renderer_Interface) {
+                    $fieldset->setRenderer($renderer);
+                }
 
                 // Prepare customer confirmation control (only for existing customers)
                 $confirmationKey = $customer->getConfirmation();

Previously, you called "$field->setRenderer". Since 20.12.0 you call "$fieldset->setRenderer". If I change back the $fieldset to $field, the menu works again.

As far as i see, there are 3 different lines with this problem. Line 171, line 212 and line 236.

@sreichel
Copy link
Contributor

Sorry, PR comes in next hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants