call_user_func_array() expects parameter 1 to be a valid callback,class 'Mage_Checkout_Helper_Data' does not have a method in Core\Model\Layout.php
-
21-10-2020 - |
Question
I updated a Magento shop from 1.7.0.2 to 1.9.2.2 version and now I can't add products to cart and I receive warning every time I reload product page. It's in the function _generateAction($node, $parent)
in Mage\Core\Model\Layout.php
and when I add log I get for helper checkout
Mage_Core_Model_Layout_Element Object
(
[@attributes] => Array
(
[helper] => checkout/
)
)
I am confused, don't know really how to look for solution and where to start from.
La solution
Somewhere in your layout XML files, you probably have
<action method="..."><... helper="checkout/" /></action>
^
here's the problem
after the slash a method name is missing. That's causing the weird error message, which should read does not have a method ''
(empty method name).
Autres conseils
Having similar problem, checkout is working fine but system.log is filled up with thousands of instances of
ERR (3): Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Mage_Checkout_Helper_Data' does not have a method 'cart' in xxx/public_html/app/code/core/Mage/Core/Model/Layout.php on line 324
I checked my template's layout xml files, the only reference I could find was in local.xml:
<action method="addLink" translate="label title" module="customer"><label>View Cart</label><url helper="checkout/cart"/><title>View Cart</title><prepare/><urlParams/><position>20</position><liParams>class="cart-link"</liParams></action>
But this seems correct. Where else should I look?
Thanks