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

Call to a member function getId() on a non-object #22

Closed
coresh opened this issue Feb 27, 2015 · 2 comments
Closed

Call to a member function getId() on a non-object #22

coresh opened this issue Feb 27, 2015 · 2 comments

Comments

@coresh
Copy link
Contributor

coresh commented Feb 27, 2015

Sometimes fired an issue:

Issue was affected to the file:
app/design/frontend/base/default/template/core/formkey.phtml
PS: file:
app/design/frontend/base/default/template/core/formkey.phtml
Exists, with content:
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
With permission:
$ ls -la app/design/frontend/base/default/template/core/formkey.phtml
-rwxrwxr-x. 1 www-data www-data 1083 Feb 14 18:09 app/design/frontend/base/default/template/core/formkey.phtml
Log output:
$ tail -1000 var/report/1438582095995
a:5:{i:0;s:56:"Call to a member function getId() on a non-object (NULL)";i:1;s:2695:"#0 .modman/Cm_Diehard/Mage/Core/Block/Template.php(250): include()
#1 .modman/Cm_Diehard/Mage/Core/Block/Template.php(281): Mage_Core_Block_Template->fetchView()
#2 .modman/Cm_Diehard/Mage/Core/Block/Template.php(295): Mage_Core_Block_Template->renderView()
#3 .modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Core_Block_Template->_toHtml()
#4 app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#5 .modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Core_Block_Text_List->_toHtml()
#6 .modman/Cm_Diehard/Mage/Core/Block/Abstract.php(642): Mage_Core_Block_Abstract->toHtml()
#7 .modman/Cm_Diehard/Mage/Core/Block/Abstract.php(586): Mage_Core_Block_Abstract->_getChildHtml()
#8 app/design/frontend/rwd/cdf/template/page/1column.phtml(55): Mage_Core_Block_Abstract->getChildHtml()
#9 .modman/Cm_Diehard/Mage/Core/Block/Template.php(250): include()
#10 .modman/Cm_Diehard/Mage/Core/Block/Template.php(281): Mage_Core_Block_Template->fetchView()
#11 .modman/Cm_Diehard/Mage/Core/Block/Template.php(295): Mage_Core_Block_Template->renderView()
#12 .modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Core_Block_Template->_toHtml()
#13 app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#14 app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#15 app/code/local/Act/Locale/controllers/CartController.php(261): Mage_Core_Controller_Varien_Action->renderLayout()
#16 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Act_Locale_CartController->indexAction()
#17 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch()
#18 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match()
#19 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 app/Mage.php(684): Mage_Core_Model_App->run()
#21 pub/index.php(268): Mage::run()
#22 {main}";s:3:"url";s:21:"/en_us/checkout/cart/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"en_us";}%
@colinmollenhour
Copy link
Owner

That is odd since the stack trace doesn't really seem to show where the error lies. It usually has arguments listed between the (), were these omitted?

Do you have the cart page enabled for caching? Since this page will vary for every user and should contain session messages and such I would not recommend caching it if you are.

@coresh
Copy link
Contributor Author

coresh commented Feb 28, 2015

General issue was occurring concerning to child block error (another .phtml file) and in this case not affected to Cm_Diehard extention

Please close this issue

coresh added a commit to coresh/Cm_Diehard that referenced this issue Sep 1, 2015
To exclude Warning:

Warning: include(): Filename cannot be empty  in /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php on line 250

#0 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(250): mageCoreErrorHandler(2, 'include(): File...', '/var/www/lightt...', 250, Array)
colinmollenhour#1 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(250): include()
colinmollenhour#2 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(281): Mage_Core_Block_Template->fetchView('adminhtml/base/...')
colinmollenhour#3 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(295): Mage_Core_Block_Template->renderView()
colinmollenhour#4 /magento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
colinmollenhour#5 /magento/.modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Adminhtml_Block_Template->_toHtml()
colinmollenhour#6 /magento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
colinmollenhour#7 /magento/.modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Core_Block_Text_List->_toHtml()
colinmollenhour#8 /magento/.modman/Cm_Diehard/Mage/Core/Block/Abstract.php(642): Mage_Core_Block_Abstract->toHtml()
colinmollenhour#9 /magento/.modman/Cm_Diehard/Mage/Core/Block/Abstract.php(586): Mage_Core_Block_Abstract->_getChildHtml('content', true)
colinmollenhour#10 /magento/app/design/adminhtml/default/default/template/page.phtml(67): Mage_Core_Block_Abstract->getChildHtml('content')
colinmollenhour#11 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(250): include('/var/www/lightt...')
colinmollenhour#12 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(281): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
colinmollenhour#13 /magento/.modman/Cm_Diehard/Mage/Core/Block/Template.php(295): Mage_Core_Block_Template->renderView()
colinmollenhour#14 /magento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
colinmollenhour#15 /magento/.modman/Cm_Diehard/Mage/Core/Block/Abstract.php(936): Mage_Adminhtml_Block_Template->_toHtml()
colinmollenhour#16 /magento/app/code/core/Mage/Core/Model/Layout.php(556): Mage_Core_Block_Abstract->toHtml()
colinmollenhour#17 /magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
colinmollenhour#18 /magento/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(119): Mage_Core_Controller_Varien_Action->renderLayout()
colinmollenhour#19 /magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
colinmollenhour#20 /magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
colinmollenhour#21 /magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
colinmollenhour#22 /magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
colinmollenhour#23 /magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
colinmollenhour#24 /magento/pub/index.php(366): Mage::run('default', 'store')
colinmollenhour#25 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants