3

After I updated few security patches in my local Magento 1.9.3.8. PHP 7.o-fpm, nginx server.

SUPEE-10888
SUPEEE-10975
SUPEE-11085
SUPEE-11155

So when I was testing all functionalities I saw that when I click on edit customer on the backend something was wrong because I could only see this:

enter image description here

I then go and check the logs back there was nothing in logs I also checked the nginx error.log I realised that everytime I click edit the logs are being populated as follow.

2019/07/08 08:26:21 [error] 6266#6266: *169 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot declare class Mage_Customer_Helper_Address, because the name is already in use in /home/ntabethemba/projects/nlg/app/code/core/Mage/Customer/Helper/Address.php on line 0
PHP message: PHP Stack trace:
PHP message: PHP   1. {main}() /home/ntabethemba/projects/nlg/index.php:0
PHP message: PHP   2. Mage::run() /home/ntabethemba/projects/nlg/index.php:85
PHP message: PHP   3. Mage_Core_Model_App->run() /home/ntabethemba/projects/nlg/app/Mage.php:683
PHP message: PHP   4. Mage_Core_Controller_Varien_Front->dispatch() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Model/App.php:365
PHP message: PHP   5. Mage_Core_Controller_Varien_Router_Admin->match() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Controller/Varien/Front.php:172
PHP message: PHP   6. Mage_Adminhtml_CustomerController->dispatch() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:254
PHP message: PHP   7. Mage_Adminhtml_CustomerController->editAction() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Controller/Varien/Action.php:418
PHP message: PHP   8. Mage_Adminhtml_CustomerController->renderLayout() /home/ntabethemba/projects/nlg/app/code/core/Mage/Adminhtml/controllers/CustomerController.php:161
PHP message: PHP   9. Mage_Core_Model_Layout->getOutput() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Controller/Varien/Action.php:390
PHP message: PHP  10. Mage_Adminhtml_Block_Page->toHtml() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Model/Layout.php:555
PHP message: PHP  11. Mage_Adminhtml_Block_Page->_toHtml() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Block/Abstract.php:923
PHP message: PHP  12. Mage_Adminhtml_Block_Page->_toHtml() /home/ntabethemba/projects/nlg/app/code/core/Mage/Adminhtml/Block/Template.php:81
PHP message: PHP  13. Mage_Adminhtml_Block_Page->renderView() /home/ntabethemba/projects/nlg/app/code/core/Mage/Core/Block/Template.php:286

I looked for the duplication of this class Mage_Customer_Helper_Address I couldn't find it. so I follow another pages that are in the logs when I check the code seems to be okay. I also edited this file during patching manually customerController.php

/**
     * Customer edit action
     */
    public function editAction()
    {
        $this->_initCustomer();
        $this->loadLayout();

        /* @var $customer Mage_Customer_Model_Customer */
        $customer = Mage::registry('current_customer');

        // set entered data if was error when we do save
        $data = Mage::getSingleton('adminhtml/session')->getCustomerData(true);

        // restore data from SESSION
        if ($data) {
            $request = clone $this->getRequest();
            $request->setParams($data);

            if (isset($data['account'])) {
                /* @var $customerForm Mage_Customer_Model_Form */
                $customerForm = Mage::getModel('customer/form');
                $customerForm->setEntity($customer)
                    ->setFormCode('adminhtml_customer')
                    ->setIsAjaxRequest(true);
                $formData = $customerForm->extractData($request, 'account');
                $customerForm->restoreData($formData);
            }

            if (isset($data['address']) && is_array($data['address'])) {
                /* @var $addressForm Mage_Customer_Model_Form */
                $addressForm = Mage::getModel('customer/form');
                $addressForm->setFormCode('adminhtml_customer_address');

                foreach (array_keys($data['address']) as $addressId) {
                    if ($addressId == '_template_') {
                        continue;
                    }

                    $address = $customer->getAddressItemById($addressId);
                    if (!$address) {
                        $address = Mage::getModel('customer/address');
                        $customer->addAddress($address);
                    }

                    $formData = $addressForm->setEntity($address)
                        ->extractData($request);
                    $addressForm->restoreData($formData);
                }
            }
        }

        $this->_title($customer->getId() ? $customer->getName() : $this->__('New Customer'));

        /**
         * Set active menu item
         */
        $this->_setActiveMenu('customer/new');

        $this->renderLayout();
    }

I am running out of options I'd appreciate if anyone can help.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.