Invalid method Mage_Wishlist_Block_Links::addWishlistLink

Article ID #1089
Revision: 1.2
Last update: 2011-05-19

The following error message is shown by Magento:

a:5:{i:0;s:69:"Invalid method Mage_Wishlist_Block_Links::addWishlistLink(Array

 

“addWishlistLink()” method has been removed from the Mage_Wishlist_Block_Link class in Magento 1.4.2.0 version.

So, the error can occur on using Magento 1.4.1.x capable theme with Magento 1.4.2.0.

 

 

To solve this you need to update layout/wishlist.xml for your theme to the new version. The file should be located in app/design/frontend/default/<your_theme>/layout/wishlist.xml file. If there are no wishlist.xml in your theme, then check app/design/frontend/base/default/layout/wishlist.xml

 

Old wishlist.xml file from Magento 1.4.1.1 version contains the following section at the top:

        
        <reference name="top.links">
            <block type="wishlist/links" name="wishlist_link">
                <action method="addWishlistLink"></action>
            </block>
        </reference>

 

The new one, from 1.4.2.0 version should contain:

        
        <reference name="top.links">
            <block type="wishlist/links" name="wishlist_link"/>
            <action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
        </reference>

 

It is needed replace the old block with the new one, and flush Magento cache at System > Cache Management to solve this issue.

Did this article help you solve your issue?

completely useless 1 2 3 4 5 most valuable

Tags: ,