3

I have a big problem on my website.

A few days ago i started getting erros in my system.log. I already looked into them, but due lack of time it was sceduled for tomorrow.

But since now customers can't login anymore or retrieve the adress.

I did find where it went wrong. In my checkout extension i had a wrong address line.

I had this code:

 <li class="d_3">
                <label for="billing:street1"><?php echo $this->__('Address') ?> <span class="required">*</span></label>
                <div class="input-box">
                    <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
                </div>
            </li>
                            <li class="d_3">
                <label for="billing:street2"><?php echo $this->__('Housenumber') ?> <span class="required">*</span></label>
                <div class="input-box">
                    <input type="text" title="<?php echo $this->__('Housenumber') ?>" name="billing[street][]" id="billing:street2" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(2)) ?>" class="input-text required-entry" />
                </div>
            </li>
                           <li class="d_3">
                <label for="billing:street3"><?php echo $this->__('Address Additional') ?></label>
                <div class="input-box">
                    <input type="text" title="<?php echo $this->__('Address Additional') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(3)) ?>" class="input-text" />
                </div>
            </li> 

But i saw i have used the wrong id in the last last ... it said 1 what should be 3 ...

I guess this was making my error's. I restored it to original:

<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
            <br/>
            <li class="d_3">
                <div class="input-box">
                    <input type="text" title="<?php echo $this->__('Street Address '.$_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
                </div>
            </li>
            <?php endfor ?>

i get the following errors:

Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in /pathtomagento/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 114 and defined  in /pathtomagento/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59

#0 /pathtomagento/app/code/core/Mage/Eav/Model/Attribute/Data.php(59): mageCoreErrorHandler(4096, 'Argument 1 pass...', '/var/www/vhosts...', 59, Array)
#1 /pathtomagento/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php(114): Mage_Eav_Model_Attribute_Data::factory(Object(Mage_Eav_Model_Entity_Attribute), Object(Mage_Sales_Model_Order_Address))
#2 /pathtomagento/app/code/core/Mage/Customer/Model/Address/Abstract.php(337): Mage_Customer_Block_Address_Renderer_Default->render(Object(Mage_Sales_Model_Order_Address))
#3 /pathtomagento/app/code/core/Mage/Customer/Model/Address/Abstract.php(326): Mage_Customer_Model_Address_Abstract->format('html')
#4 /pathtomagento/app/design/adminhtml/default/quickcheckout/template/sales/order/view/info.phtml(163): Mage_Customer_Model_Address_Abstract->getFormated(true)
#5 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#6 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#7 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /pathtomagento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#9 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#10 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#11 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('order_info', true)
#12 /pathtomagento/app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml(33): Mage_Core_Block_Abstract->getChildHtml('order_info')
#13 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#14 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#15 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#16 /pathtomagento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#17 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#18 /pathtomagento/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#19 /pathtomagento/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Sales_Order_View_Tab_Info))
#20 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#21 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#22 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#23 /pathtomagento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#24 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#25 /pathtomagento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#26 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#27 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#28 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#29 /pathtomagento/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#30 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#31 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#32 /pathtomagento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#33 /pathtomagento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#34 /pathtomagento/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#35 /pathtomagento/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#36 /pathtomagento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#37 /pathtomagento/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(128): Mage_Core_Controller_Varien_Action->renderLayout()
#38 /pathtomagento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->viewAction()
#39 /pathtomagento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#40 /pathtomagento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#41 /pathtomagento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#42 /pathtomagento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#43 /pathtomagento/index.php(88): Mage::run('', 'store')
#44 {main}

UPDATE 28-06-2015 - 22:30 (Europe/Amsterdam):

Everything works again .... But i still get the error's in my system.log. Does any one know what is wrong?

  • Have you tried clearing your cache and reindexing? – Tim Hallman Jun 28 '15 at 20:40
  • I have ... i did get my login possiblity back .... the developer output was on ... but i now only get this line in my system.log Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in /pathtomagento/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 114 and defined in /pathtomagento/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59 without the rest of the trace – Ronny Jun 28 '15 at 20:55
4

This error is related to table eav_attribute

You'll need to check column attribute_model for value eav/entity_attribute

Set this to NULL once you find the attribute code with this value

Sometimes it's the dob attribute code that throws up the error

| improve this answer | |
1

It was solved by running the following SQL querry:

UPDATEeav_attributeSET attribute_model = NULL WHERE attribute_id = '25'

| improve this answer | |
  • This does not sort the issue. Where did you get the ID 25? – Mike Apr 2 '17 at 20:01
0

Correct solution is what @elfing said

DO NOT just set attribute_model to null on attribute_id 25 as what @Ronny said - this isn't guaranteed to be correct for your environment.

For me, I found the record by running the following:

SELECT * FROM `eav_attribute` WHERE attribute_code = 'eav/entity_attribute'

I then set the attribute_code to NULL on this record and it fixed my issue.

I was unable to view any orders from the Magento backend before.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.