cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid method Mage_Checkout_Block_Cart::_isSecure

SOLVED

Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi,

I've been trying to resolve this problem with the help of my associate and google for more than 10 days without succes so anyhelp will be greatly appreciated.

we started developping our shop on magento 1.9.1 then i updated by mistake to 1.9.2 we lost a lot of data but we couldn't resolve one problem is that the cart is not working anymore avery time i click on add to cart i recieve this error message:

 

Invalid method Mage_Checkout_Block_Cart::_isSecure(Array
(
)
)

#0 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Checkout/Block/Cart.php(130): Varien_Object->__call('_isSecure', Array)
#1 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Checkout/Block/Cart.php(130): Mage_Checkout_Block_Cart->_isSecure()
#2 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/design/frontend/rwd/default/template/checkout/cart.phtml(50): Mage_Checkout_Block_Cart->getFormActionUrl()
#3 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#4 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/rwd/de...')
#5 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#6 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/local/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#7 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#8 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/local/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#9 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/local/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#10 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/local/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#11 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/design/frontend/rwd/default/template/page/1column.phtml(55): Mage_Core_Block_Abstract->getChildHtml('content')
#12 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#13 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/rwd/de...')
#14 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/local/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#16 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#17 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#18 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Checkout/controllers/CartController.php(181): Mage_Core_Controller_Varien_Action->renderLayout()
#19 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->indexAction()
#20 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#21 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#22 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#23 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#24 /var/www/vhosts/myhostname/httpdocs/myfolder/magento/index.php(89): Mage::run('', 'store')
#25 {main}

 

Please if you have any idea what does it mean.

thank you

9 REPLIES

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi.

 

What was your method for upgrading? This is such a minor release i am quite surprised you are having such a hard time.

 

The method should exist in the file app/code/core/Mage/Core/Block/Abstract.php (around line 1480). This is extended by app/code/core/Mage/Checkout/Block/Cart/Abstract.php and should look like;

 

abstract class Mage_Checkout_Block_Cart_Abstract extends Mage_Core_Block_Template

 

and then extended by the class you are receiving the error from; app/code/core/Mage/Checkout/Block/Cart.php and should look like

 

class Mage_Checkout_Block_Cart extends Mage_Checkout_Block_Cart_Abstract

 

Can you check to see if that is all true in your case?

 

Regards,

Andy

Problem solved? Click Accept as Solution!
www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi.

 

Thank you very much for your answer.

 

I think we had a hard time because we developed our skin the wrond way, we took the responsive skin of magento rwd and we started changing its files.

 

For upgrading I used "check for updates" on magento connect manager.

 

I did'nt find the method in app/code/core/Mage/Core/Block/Abstract.php the I checked a working untouched magento and the file is the same maybe i missed something so here is the file: 

https://drive.google.com/file/d/0B_O6CHlU0FI0UWpIbGF3Q0c5Nkk/view?usp=sharing

 

The method is extended in app/code/core/Mage/Checkout/Block/Cart/Abstract.php as you said if you want to take a look here is the file:

https://drive.google.com/file/d/0B_O6CHlU0FI0ZlZma1lKSVUwRUk/view?usp=sharing

 

And then extended in app/code/core/Mage/Checkout/Block/Cart.php here is the file:

https://drive.google.com/file/d/0B_O6CHlU0FI0a1FQUF9yMEYyR0E/view?usp=sharing

 

Thanks again for your help.

 

Regards

Joseph

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

I have just checked your first file.

The function i mentioned (_isSecure()) is at the bottom of the file.

Problem solved? Click Accept as Solution!
www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi.

Ok thank you, so do you have any idea what can cause this problem.

thank you

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Please anybody have any idea for me we are really blocked and we have a deadline on monday.

thank you

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi.

 

I have copied the definition of the function _isSecure() from app/code/core/Mage/Core/Block/Abstract.php :

 

public function _isSecure()
{
return $this->_getApp()->getFrontController()->getRequest()->isSecure();
}

 

and pasted at the end of the file app/code/core/Mage/Checkout/Block/Cart/Abstract.php

 

That resolved the problem, however as far as I know touching the core is always a bad idea. So if anybody has a better solution it will be greatly appreciated, I also noticed somethinh maybe it can help the file abstract.php has permissions rw- r-- r-- different from the other files on the same folder that have rw- rw- rw .

 

regards

joseph

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Hi

 

This may suggest that a custom module is interferring with the inheritance of the block classes possibly through rewriting one of the blocks. Do you have any custom modules installed?

 

Regards,

Andy

Problem solved? Click Accept as Solution!
www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

I think that s the case, thanks a lot for the tip, that lead us to redeclare the class in our module. that solve our problem.

thank you god bless you Smiley Happy

 

Re: Invalid method Mage_Checkout_Block_Cart::_isSecure

Thank your bug ^^.