Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Getting error when logging into the dashboard
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

Can someone help me?? Everything was working fine a couple days ago, but I tried logging into the admin screen this morning and I am getting this error:

Fatal error: Call to a member function getBackend() on a non-object in /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 373

The one thing that I did change the last time I was logged in was that I enabled the cache on everything since we just launched our shop.

Can someone tell me what went wrong here and how I might be able to fix it?

Thanks!
Katie

 
Magento Community Magento Community
Magento Community
Magento Community
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

I took a look at line 373 in Abstract.php and it looks like it might have something to do with attributes? I am by no way a PHP programmer, so I don’t know what any of this means. Can someone help me out? I do remember the last time I was logged in, I did add a new configurable attribute. Could that have thrown things off?

Here is the code on line 373:

if ($attributeInstance->getBackend()->isStatic()) {
                $attrField 
'e.' $attributeItem;
            
else {
                $this
->_addAttributeJoin($attributeItem'left');
                
$attrField $this->_getAttributeFieldName($attributeItem);
            
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

Can someone help me here? We have a live site and I am stuck. I’m not sure what to do at this point with this error. Is there any way to go into the database to remove the last couple entries that may have caused this error? Or should I reinstall...and if I do that how to I do that without loosing our products.

 
Magento Community Magento Community
Magento Community
Magento Community
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

I’ve made a little progress here. I was able to get in to the admin screen by bypassing the dashboard page and going to (thankfully) a saved internal page in the admin.

I’ve checked all the links and it looks like I can not access 2 pages.

When I go to Sales > Orders, I get a “404 Page Not Found”.

When I go to the Dashboard I still get this error:
Fatal error: Call to a member function getBackend() on a non-object in /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 373

The only think that I think that could have thrown this off is that I enabled the cache the last time I logged in.

Any thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

Here is what I have found in my logs:

a:2:{i:0;s:19:"Invalid foreign key";i:1;s:4054:"#0 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(465): Mage::exception('Mage_Eav', 'Invalid foreign...')
#1 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php(44): Mage_Eav_Model_Entity_Collection_Abstract->joinAttribute('billing_firstna...', 'order_address/f...', 'billing_address...', NULL, 'left')
#2 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(438): Mage_Adminhtml_Block_Sales_Order_Grid->_prepareCollection()
#3 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(444): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#4 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(553): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#5 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(431): Mage_Core_Block_Abstract->toHtml()
#6 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(408): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#7 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(64): Mage_Core_Block_Abstract->getChildHtml('grid')
#8 /web/shop/htdocs-mag1.0.19870/app/design/adminhtml/default/default/template/widget/grid/container.phtml(30): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
#9 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(131): include('/web/shop/htdoc...')
#10 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(163): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#11 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(180): Mage_Core_Block_Template->renderView()
#12 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(554): Mage_Core_Block_Template->_toHtml()
#13 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Text/List.php(37): Mage_Core_Block_Abstract->toHtml()
#14 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(554): Mage_Core_Block_Text_List->_toHtml()
#15 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(431): Mage_Core_Block_Abstract->toHtml()
#16 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(408): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#17 /web/shop/htdocs-mag1.0.19870/app/design/adminhtml/default/default/template/page.phtml(65): Mage_Core_Block_Abstract->getChildHtml('content')
#18 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(131): include('/web/shop/htdoc...')
#19 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(163): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#20 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Template.php(180): Mage_Core_Block_Template->renderView()
#21 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Block/Abstract.php(554): Mage_Core_Block_Template->_toHtml()
#22 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Model/Layout.php(505): Mage_Core_Block_Abstract->toHtml()
#23 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Controller/Varien/Action.php(319): Mage_Core_Model_Layout->getOutput()
#24 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(81): Mage_Core_Controller_Varien_Action->renderLayout()
#25 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Controller/Varien/Action.php(342): Mage_Adminhtml_Sales_OrderController->indexAction()
#26 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(148): Mage_Core_Controller_Varien_Action->dispatch('index')
#27 /web/shop/htdocs-mag1.0.19870/app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#28 /web/shop/htdocs-mag1.0.19870/app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#29 /web/shop/htdocs-mag1.0.19870/index.php(40): Mage::run()
#30 {main}"
;}
 
Magento Community Magento Community
Magento Community
Magento Community
 
katiek648
Member
 
Total Posts:  33
Joined:  2008-04-10
 

Update: I disabled the cache and it seems to be working okay now. If anyone runs into this though and figures out whats going on, please let me know. I assume its okay to run on disabled cache but in the future I may want to turn it on for performance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liviu
Jr. Member
 
Total Posts:  2
Joined:  2008-04-17
 

I am having the same problem, identical error, however can access all pages less dashboard. Disabling/deleting Cache won’t sort out, probably a DB isue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liviu
Jr. Member
 
Total Posts:  2
Joined:  2008-04-17
 

Ouch, after refreshing I’m having identical problems and for sure there is something rotten in magento.
Can a magento guru come up with a solution and a brief explanation?
Thanks.

2nd question: I’ m playing with magento. If backup repeatedly without any changes, can never ever get the same file size?
Why?

Invalid attribute requested: base_grand_total
Trace:
#0 \app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php(330): Mage::exception(’Mage_Eav’, ‘Invalid attribu...’)
#1 \app\code\core\Mage\Adminhtml\Block\Sales\Order\View\Tab\Invoices.php(45): Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToSelect(’base_grand_tota...’)
#2 \app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(438): Mage_Adminhtml_Block_Sales_Order_View_Tab_Invoices->_prepareCollection()
#3 \app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(444): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#4 \app\code\core\Mage\Core\Block\Abstract.php(553): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#5 \app\code\core\Mage\Adminhtml\Block\Sales\Order\View\Tabs.php(50): Mage_Core_Block_Abstract->toHtml()
#6 \app\code\core\Mage\Core\Block\Abstract.php(553): Mage_Adminhtml_Block_Sales_Order_View_Tabs->_beforeToHtml()
#7 \app\code\core\Mage\Core\Block\Text\List.php(37): Mage_Core_Block_Abstract->toHtml()
#8 \app\code\core\Mage\Core\Block\Abstract.php(554): Mage_Core_Block_Text_List->_toHtml()
#9 \app\code\core\Mage\Core\Block\Abstract.php(431): Mage_Core_Block_Abstract->toHtml()
#10 \app\code\core\Mage\Core\Block\Abstract.php(408): Mage_Core_Block_Abstract->_getChildHtml(’left’, true)
#11 \app\design\adminhtml\default\default\template\page.phtml(49): Mage_Core_Block_Abstract->getChildHtml(’left’)
#12 \app\code\core\Mage\Core\Block\Template.php(131): include(’C:\wamp\www\alp...’)
#13 \app\code\core\Mage\Core\Block\Template.php(163): Mage_Core_Block_Template->fetchView(’adminhtml\defau...’)
#14 \app\code\core\Mage\Core\Block\Template.php(180): Mage_Core_Block_Template->renderView()
#15 \app\code\core\Mage\Core\Block\Abstract.php(554): Mage_Core_Block_Template->_toHtml()
#16 \app\code\core\Mage\Core\Model\Layout.php(505): Mage_Core_Block_Abstract->toHtml()
#17 \app\code\core\Mage\Core\Controller\Varien\Action.php(319): Mage_Core_Model_Layout->getOutput()
#18 \app\code\core\Mage\Adminhtml\controllers\Sales\OrderController.php(104): Mage_Core_Controller_Varien_Action->renderLayout()
#19 \app\code\core\Mage\Core\Controller\Varien\Action.php(342): Mage_Adminhtml_Sales_OrderController->viewAction()
#20 \app\code\core\Mage\Core\Controller\Varien\Router\Admin.php(148): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#21 \app\code\core\Mage\Core\Controller\Varien\Front.php(146): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#22 \app\Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#23 \index.php(40): Mage::run()
#24 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
hayssamh
Jr. Member
 
Total Posts:  4
Joined:  2008-07-03
 

I’m having the same problem, except that after trying to disable cache, now I’m getting a fatal error and no way to get around it.

There has been an error processing your request.

Error in file: “D:\wamp\www\magento2\magento\app\code\core\Mage\Sales\sql\sales_setup\mysql4-upgrade-0.8.29-0.9.0.php” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘sales_flat_quote’ already exists
Trace:
#0 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(280): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(172): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘0.8.29’, ‘0.9.11’)
#2 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(139): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’0.8.29’, ‘0.9.11’)
#3 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(114): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\Config.php(209): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 D:\wamp\www\magento2\magento\app\code\core\Mage\Core\Model\App.php(230): Mage_Core_Model_Config->init(Array)
#6 D:\wamp\www\magento2\magento\app\Mage.php(397): Mage_Core_Model_App->init(’’, ‘store’, Array)
#7 D:\wamp\www\magento2\magento\app\Mage.php(416): Mage::app(’’, ‘store’, Array)
#8 D:\wamp\www\magento2\magento\index.php(40): Mage::run()

Now Magento is totally stuck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
turnon
Sr. Member
 
Total Posts:  129
Joined:  2008-02-20
 

how did you solve this problem

install magento again ? or restore abackup ?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top